Listing posts

Displaying posts 196 - 200 of 328 in total
Free uncensored DNS
mouse 13098 · person cloud · link
Last update
2019-03-18
2019
03-18
« — »
Name IPs Origin Notes
DNS.watch 84.200.69.80
84.200.70.40
EU / Munich, Germany no logs, DNSSEC
FreeDNS 37.235.1.174
37.235.1.177
EU / Wien, Austria no logs
Cloudflare 1.1.1.1
1.0.0.1
HK / Honk Kong
AU / Australia
logs lasts 24h
does not log IPs
DNScrypt.eu 77.66.84.233:443 EU / Koebenhavn, Denmark DNSCrypt only1
DNScrypt.eu 176.56.237.171:443 EU / Nuland, Netherlands DNSCrypt only1
UncensoredDNS 91.239.100.100
89.233.43.71
EU / Copenhagen, Denmark no logs, AnyCast
OpenNIC many * depends on server

Source: greycoder

Android app: OverrideDNS


~~~ * ~~~

Dieta per gastrite e reflusso gastroesofageo attachment
mouse 1522 · person cloud · link
Last update
2019-03-15
2019
03-15
« — »

Sulla base dell'utilissimo opuscolo Alimentarsi informati della ULSS1 di Belluno ho compilato una griglia di cibi s/consigliati per chi ha la gastrite (cronica) o il reflusso gastroesofageo.

Non mi assumo alcuna responsabilità per chi deciderà di usare il mio file, per ogni cosa rivolgetevi sempre al vostro medico di fiducia!

Vedi il file dieta_gastrite-reflusso.ods allegato al post (apribile con libreoffice).


~~~ * ~~~

NetworkManager WiFi Power Saving
mouse 1817 · person cloud · link
Last update
2019-03-09
2019
03-09
« — »
1
2
3
4
# /etc/NetworkManager/conf.d/wifi-powersave.conf 
[connection]
# 0=use default, 1=ignore/don't touch, 2=disable, 3=enable
wifi.powersave = 2

Source: gist.github.com/jcberthon


~~~ * ~~~

Redis setup
mouse 2781 · person cloud · link
Last update
2019-02-21
2019
02-21
«caching with http://redis.io/»

NOTE: Redis has changed its license... see its GoodFORM fork on github.


Configure Linux:

1
2
3
4
5
6
7
8
9
echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf
sysctl vm.overcommit_memory=1

echo "net.core.somaxconn = 512" >> /etc/sysctl.conf
sysctl net.core.somaxconn=512

# run and add this to /etc/rc.local (system startup) or
# reboot with the kernel bootparam transparent_hugepage=never
echo never > /sys/kernel/mm/transparent_hugepage/enabled

Compile Redis:

1
2
3
4
5
6
7
8
9
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
sudo apt-get install libc6-dev-i386 # per la versione a 32bit
make 32bit # usa less ram but max memory will be 3GB

# optional
sudo apt-get install tcl8.5
make test

Configure Redis (redis.conf):

1
2
3
4
5
6
7
8
9
10
11
bind 127.0.0.1
daemonize yes
pidfile /path/to/redis.pid
logfile "/path/to/redis.log"
unixsocket /path/to/redis.sock
unixsocketperm 700
save "" # disable auto snapshots
dir /path/to/db_dump_dir
# NOTE: snapshots can take up to 2x maxmemory
maxmemory xxxMB
maxmemory-policy allkeys-lru # eviction policy

Configure Rails:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# in Gemfile:
gem 'hiredis'  # speed up redis client
gem 'redis', require: %w{ redis redis/connection/hiredis } # redis client
gem 'readthis' # use redis as a faster cache store

# in environment config:
config.cache_store = :readthis_store, {
  expires_in: 1.hour.to_i,
  namespace: 'foobar',
  redis: { # redis-rb params
    # host: 'localhost', port: 6379, db: 0,
    url:  'redis://localhost:6379/0',
    # path: 'tmp/sockets/redis.sock', # this is not fault tolerant
  },
  driver: :hiredis
}

# in config/initializers/redis.rb:
Readthis.fault_tolerant = true

# everywhere in the code always use .to_i for expiration time:
expires_in: 1.week.to_i

Source: Redis.io quickstart, full docs, LRU, Admin; DigitaOcean/redis; SitePoint/rails; SitePoint/models; Stackoverflow/models


~~~ * ~~~

Extract frames from video files
mouse 1294 · person cloud · link
Last update
2019-02-12
2019
02-12
« — »
1
2
3
mplayer -vo jpeg -ss 00:00:10 -frames 1 in.mp4 && mv 00000001.jpg out.jpg

ffmpeg -ss 10 -i in.mp4 -t 1 -f image2 out.jpg

Source: AskUbuntu