Skip to content

Instantly share code, notes, and snippets.

View paramah's full-sized avatar
🐍
klaatu barada nikto

Aleksander Cynarski paramah

🐍
klaatu barada nikto
View GitHub Profile

Keybase proof

I hereby claim:

  • I am paramah on github.
  • I am paramah (https://keybase.io/paramah) on keybase.
  • I have a public key ASA93_hBgta5K9Og5Nip6KY2FTp6PvpePG3x3z1V7jVcBQo

To claim this, I am signing this object:

(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(add-hook 'after-init-hook 'global-company-mode)
(global-set-key [C-tab] 'company-complete)
(tool-bar-mode -1)
bin/ bind.sql
root@syzyf:~# cat /root/bin/mysql-backup.sh
#!/bin/bash -x
NOW=$(date +"%F")
NOWT=$(date +"%T")
## Backup path ##
BAK="/var/spool/mysql_local/$NOW"
[ -d $BAK ] || mkdir $BAK
@paramah
paramah / xmpp
Last active December 25, 2015 20:58
xmpp nginx
# Super
upstream xmpp {
server 10.0.0.10:5280;
server 10.0.0.11:5280;
server 10.0.0.12:5280;
}
map $cookie_vroute $sticky {
default xmpp;
@paramah
paramah / gist:6813719
Created October 3, 2013 17:31
#tvn Ciekawy patent :)
paramah@lobo ~> GET "http://fakty.tvn.pl/"
HTTP/1.1 302 Found
Accept-Ranges: bytes
Age: 44
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 190
Content-Type: text/html; charset=iso-8859-1
Date: Thu, 03 Oct 2013 17:29:48 GMT
Location: http://www.tvn24.pl/fakty.html
@paramah
paramah / gist:6596222
Last active December 23, 2015 06:49
nginx + websocket SSL
server {
listen 443;
server_name @@host@@;
access_log /var/log/nginx/@@host@@.log;
error_log /var/log/nginx/@@host@@.log;
ssl on;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/key.key;
@paramah
paramah / gist:4012425
Created November 4, 2012 16:04
nginx dev template
server {
listen 80;
server_name @@domain@@;
access_log @@dir@@/access.log slim;
error_log @@dir@@/error.log;
location / {
root @@dir@@;
if (-f $request_filename) {
expires 30d;
@paramah
paramah / gist:4012341
Created November 4, 2012 15:42
skypcior....
#!/bin/sh
KEY="$HOME/.ssh/identity.pub"
if [ ! -f ~/.ssh/identity.pub ];then
echo "private key not found at $KEY"
echo "* please create it with "ssh-keygen -t dsa" *"
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *"
exit
fi
@paramah
paramah / gist:3976527
Created October 29, 2012 21:03
Automacik - surowy ;-)
#!/usr/bin/python
import os, sys, getopt, socket
from pwd import getpwnam
WORKDIR = "/Users/paramah/internals/configuration/"
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "hd:u:t:s:", ["help", "domain="])
@paramah
paramah / create-vhost.py
Created May 14, 2012 10:03
nginx configuration vhost automat
#!/usr/bin/python
import os, sys, getopt, socket
from pwd import getpwnam
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "hd:u:t:s:", ["help", "domain="])
except getopt.GetoptError, err:
print str(err)
usage()