Skip to content

Instantly share code, notes, and snippets.

View kotnik's full-sized avatar

Nikola Kotur kotnik

View GitHub Profile
@kotnik
kotnik / pastebin.sh
Last active August 26, 2015 10:17 — forked from ralt/pastebin.sh
putfile & pastebin
#!/bin/bash
file=$(mktemp ~/Documents/Pastes/XXXXXX)
mv $file $file.html
file="$file.html"
chmod 644 ${file}
[[ ! -z "$1" ]] && lang="-s $1"
cat - > ${file}.in
@kotnik
kotnik / gist:9131458
Created February 21, 2014 09:43
Wipe the squid away
systemctl stop squid.service
rm -rf /var/spool/squid
mkdir -p /var/spool/squid
chown proxy: /var/spool/squid
squid -z
systemctl start squid.service
@kotnik
kotnik / project.make
Last active August 29, 2015 13:57 — forked from perusio/project.make
; -*-conf-*-
api = 2
core = 7.x
; Commerce kickstart.
projects[commerce_kickstart][type] = core
; Be2Bill needed modules.
projects[commerce_cardonfile] = "2.0-beta2"
projects[commerce_be2bill] = "1.x-dev"
@kotnik
kotnik / print_pkg_deps.py
Created May 7, 2014 07:48 — forked from mtayseer/print_pkg_deps.py
Print a list of installed packages and their dependencies
import pkg_resources
for pkg in pkg_resources.working_set:
if pkg.requires():
print '{} => {}'.format(pkg.key, ', '.join(req.project_name for req in pkg.requires()))
else:
print pkg.key
import time
import contextlib
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
FB_USER = "YOUR FACEBOOK MAIL"
FB_PASS = "YOUR FACEBOOK PASSWORD"
backoff_time = 5
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Need filename"
exit 1
fi
file_ext=$(echo $1 |awk -F . '{if (NF>1) {print $NF}}')
file=$(mktemp /tmp/XXXXXX.$file_ext)
cp "$1" $file
Package: lxc-templates
Architecture: linux-any
Depends: lxc (>= 0.8.0), ${misc:Depends}
Recommends: busybox-static,
debootstrap | cdebootstrap,
openssl,
rsync,
uuid-runtime,
xz-utils
Suggests: qemu-user-static
Verifying that +kotnik is my Bitcoin username. You can send me #bitcoin here: https://onename.io/kotnik
api = 2
core = 7.x
; Drupal core.
projects[drupal][type] = core
projects[drupal][version] = 7.32
projects[drupal][patch][] = "https://drupal.org/files/issues/install-redirect-on-empty-database-728702-36.patch"
; Platform indicator module.
projects[platform][version] = 1.2
$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 567 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
Processing activity environment.push
Found 1 new commit.