Skip to content

Instantly share code, notes, and snippets.

@npeters
npeters / Linux Bluetooth
Created January 8, 2017 22:20
Linux Bluetooth
- tools:
bluetoothctl
connect
scan
trust
- headset:
apt install pulseaudio-module-bluetooth
@npeters
npeters / mycanal-live.js
Last active January 4, 2017 22:58
mycanal resize window
window.body.style.overflow="hidden";
d = document.querySelector('#one-player > div');
d.style.width = "100%";
//d.style.heigth = "100%"
d.style.bottom="0px";
document.querySelector("#lb").style.width="100%";
@npeters
npeters / VSCode Debug launch.json
Last active June 24, 2016 14:10
TypeScript + Webpack + vscode + chrome-debug
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"type": "chrome",
"request": "attach",
"port": 9222,
"webRoot": "${workspaceRoot}/target",
"url": "http://localhost:8080/",
@npeters
npeters / script Hibernate
Last active June 2, 2016 19:19
Linux Hibernate
http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/
http://askubuntu.com/questions/761394/why-isnt-hibernate-in-ubuntu-16-04-working-and-how-to-fix-it
http://ubuntuforums.org/showthread.php?t=1042946
```
tail -n -9 /proc/swaps | cut -d ' ' -f 1 | xargs sudo blkid
mount | grep " / " ;# Note your /dev/... on /
sudo blkid -g
sudo blkid ;## get / -> /dev/... -> partition UUID -> resume=UUID=
sudo filefrag -v /swapfile | grep "First block:" ;## get First block -> resume_offset
curlp 'p1-hapi-catalogsearchb01:9200/xwing*/_search?q=idKey:ANT_1172431_57&fields:_id&size=500' | jq '.hits.hits[]._source
sudo apt-get -y install git-core gitg gedit gedit-plugins gparted bleachbit gnome-do
@npeters
npeters / gist:3b45417489565f17332a
Created March 31, 2015 22:03
Console cusor move
C-xC-e editor
Ctrl + A or Home Moves the cursor to the start of a line.
Ctrl+ E or End Moves the cursor to the end of a line.
Esc + B Moves to the beginning of the previous or current word.
Ctrl + K Deletes from the current cursor position to the end of the line.
Ctrl + U Deletes from the start of the line to the current cursor position.
@npeters
npeters / JVM Env
Last active August 29, 2015 14:16
Conf de log pour l'Oracle Driver ojdbc6_g.jar
-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/app/jboss/server/PFSERV_BO01/OracleLog.properties
@npeters
npeters / nginx.conf
Last active August 29, 2015 14:13
nginx router
# map http://nginx.org/en/docs/http/ngx_http_map_module.html#map
# dns https://www.jethrocarr.com/2013/11/02/nginx-reverse-proxies-and-dns-resolution/
# http://www.senginx.org/en/index.php/Dynamic_DNS_Resolve
events {
worker_connections 4096; ## Default: 1024
}
http {
index index.html index.htm index.php;
@npeters
npeters / haproxy.cfg
Last active August 29, 2015 14:06
HaProxy Config
global
log 127.0.0.1 local1 notice
#chroot /var/lib/haproxy
user haproxy
group haproxy
# daemon
stats socket /var/run/haproxy_${ENV}.sock mode 600 level admin
defaults
log global