Skip to content

Instantly share code, notes, and snippets.

@tskrynnyk
tskrynnyk / responsive-js-ext.html
Created November 28, 2012 05:51 — forked from alexisg/responsive.html
Simple responsive design test page. More info here: http://bricss.net/post/16538278376/simple-responsive-design-test-page. Forked by alexisg to add 15 pixels of width to frame sizes (for scrollbars) and added mobile landscape/large desktop sizes. Simply a
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style type="text/css">
body { background: #eee; font-family: sans-serif; margin: 20px; overflow-x: scroll; }
.wrapper { width: 6000px }
.frame { float: left }
h2 { color: hsl(210,10%,7%); margin: 0 0 5px 0; text-shadow: rgba(255,255,255,.75) 0 1px 0; }
@tskrynnyk
tskrynnyk / 10vpn-auto
Created December 6, 2012 19:19
NetworkManager dispatcher for connect to a VPN after a network-connection is established.
#! /bin/bash
IF_NAME="Ifupdown (eth0)"
VPN_NAME="My VPN" # default VPN
active_if=$(nmcli con status | grep "${IF_NAME}")
#active_vpn=$(nmcli con status | grep "${VPN_NAME}")
active_vpn=$(nmcli -t -f VPN con status | grep 'yes')
if [ "${active_if}" -a ! "${active_vpn}" ]; then

Create Github/Bitbucket Mirror

Create SSH key and configure

Create Key (no passphrase and name mirror the key)

ssh-keygen -t rsa -N "" -f ~/.ssh/mirror
/**
* Using Google Apps Script to enhance my gmail filters.
*
* I constantly receive email that are important for a short period of time (When I order food online!!!!) but after
* the email is no longer relative (When I get my food!) I have no need for this email. Sadly they tend to pile up on me
* (I eat a lot).
*
* Anyways you can add this 8hrDelete.gs file to https://script.google.com and set it up on a "Time Driven" trigger at what
* ever time you'll like. I run it at midnight
*/
@tskrynnyk
tskrynnyk / time.sh
Last active September 4, 2018 07:37
perl -e 'use POSIX; $|=1; while(1){ print strftime ("\r%H:%M:%S", localtime ()); select (undef, undef, undef, 0.50);}'
@tskrynnyk
tskrynnyk / update-vpnbook-pass.py
Created September 11, 2013 01:41
Update password for vpnbook.com in NeworkManager.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re, fileinput, glob
from BeautifulSoup import BeautifulSoup
import urllib2
page = urllib2.urlopen("http://www.vpnbook.com/")
soup = BeautifulSoup(page)
data = soup.find("li", id="openvpn")
# .tmux.conf
#
#setenv -g lightcolor "white"
#setenv -g darkcolor "blue"
set-option -g default-terminal "screen-256color"
set-option -g base-index 1
<?php
class Logger {
private static $file = '../log/app.log';
private static function log($level, $msg) {
$keys = array(
'HTTP_HOST',
'REDIRECT_STATUS',
'REQUEST_METHOD',
'REMOTE_ADDR',
#! /bin/bash
#
LC_ALL=C
#DIR_SRC=/var/www/squid-reports
DIR_SRC=/mnt/arch/squid-reports
DIR_DSC=/mnt/arch/squid-reports
# ------------------------------------------------------------------------------
# Daily
@tskrynnyk
tskrynnyk / login_conf.patch
Created January 12, 2015 02:01
UTF-8 for user on FreeBSD
--- .login_conf 2015-01-01 01:00:00.000000000 +0100
+++ .login_conf_new 2015-01-01 02:50:50.000000000 +0100
@@ -5,3 +5,7 @@
#me:\
# :charset=iso-8859-1:\
# :lang=de_DE.ISO8859-1:
+me:\
+ :charset=UTF-8:\
+ :lang=pl_PL.UTF-8:\
+ :setenv=LC_COLLATE=C: