Skip to content

Instantly share code, notes, and snippets.

Attila Satan AttilaSATAN

Block or report user

Report or block AttilaSATAN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fe0c60a53e9cbf498ded081fac886702
const fs = require('fs');
const http = require('http');
const WebSocket = require('ws');
const child_process = require('child_process');
const WSPORT = 8082;
const CAM1URI = 'rtsp://';
const CAM2URI = 'rtsp://';
const CAM3URI = 'rtsp://';
const ARGS = ['-rtsp_transport', 'tcp', '-i', 'rtsp://', '-f',
'mpegts', '-codec:v', 'mpeg1video', '-s', '640x480', '-b:v', '1000k', '-bf', '0', '-'
AttilaSATAN / arch-linux-install
Created Mar 24, 2017 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide ( contains a more verbose description.
# Download the archiso image from
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
View systemd-shutdown-debug.txt
Diagnosing Shutdown Problems
Just like with boot problems, when you encounter a hang during shutting down, make sure you wait at least 5 minutes to distinguish a permanent hang from a broken service that's just timing out. Then it's worth testing whether the system reacts to CTRL+ALT+DEL in any way.
If shutdown (whether it be to reboot or power-off) of your system gets stuck, first test if the kernel itself is able to reboot or power-off the machine forcedly using one of these commands:
sync && reboot -f
sync && poweroff -f
If either one of the commands does not work, it is a kernel bug, not systemd.
AttilaSATAN /
Created Oct 18, 2016
For redirecting every request to SSL and WWW. Using php-fpm.
server {
listen 80;
return 301$request_uri;
server {
listen 443;
listen [::]:443;
AttilaSATAN / server.js
Created Nov 27, 2014
oi termination signals
View server.js
View server.js
// // Website you wish to allow to connect
// res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3005');
// // Request methods you wish to allow
// res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, DELETE');
// // Request headers you wish to allow
// res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type,Authorization');
// // Set to true if you need the website to include cookies in the requests sent
AttilaSATAN /
Created Nov 19, 2014
python version switch

For me it got fixed by replacing python2.7 by python2.6. As per , it seems that gyp depends on python 2.6

On Ubuntu Saucy:

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.6
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 20
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10
You can’t perform that action at this time.