Skip to content

Instantly share code, notes, and snippets.

View linuxenko's full-sized avatar

Svetlana Linuxenko linuxenko

View GitHub Profile
xdotool key Caps_Lock
void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val)
{
uint8_t i;
for (i = 0; i < 8; i++) {
if (bitOrder == LSBFIRST)
digitalWrite(dataPin, !!(val & (1 << i)));
else
digitalWrite(dataPin, !!(val & (1 << (7 - i))));
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
In your conky config, add:
own_window yes
own_window_class Conky
own_window_type override
This line keeps conky from getting controlled by the wm:
own_window_type override
@linuxenko
linuxenko / hosts.txt
Created February 26, 2018 18:18
away ad
# AdAway default blocklist
# Blocking mobile ad providers and some analytics providers
#
# Contribute:
# Create an issue at https://github.com/AdAway/AdAway/issues
#
# Changelog:
# 2016-07-18 Now hosted on GitHub + Cloudflare
# 2014-05-18 Now with a valid SSL certificate available at https://adaway.org/hosts.txt
# 2013-03-29 Integrated some hosts from
# add group (to be used for iptables matching)
groupadd novpn
# add user to group
adduser yourusername novpn
# set iptables rules (marking packets of novpn group)
iptables -t mangle -A OUTPUT -m owner --gid-owner novpn -j MARK --set-mark 1
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
@linuxenko
linuxenko / client.conf
Created November 20, 2017 11:35
vkontakte openvpn rules
## vk
route 95.213.0.0 255.255.192.0
route 95.142.207.0 255.255.255.0
route 95.142.206.0 255.255.255.0
route 95.142.204.0 255.255.248.0
route 95.142.203.0 255.255.255.0
route 95.142.202.0 255.255.255.0
route 95.142.201.0 255.255.255.0
route 95.142.192.0 255.255.248.0
route-nopull
route 195.82.146.30 255.255.255.255
route 195.82.146.52 255.255.255.255
route 195.82.146.216 255.255.255.255
route 195.82.146.215 255.255.255.255
route 195.82.146.214 255.255.255.255
cidr2mask() {
local i mask=""
local full_octets=$(($1/8))
local partial_octet=$(($1%8))
for ((i=0;i<4;i+=1)); do
if [ $i -lt $full_octets ]; then
mask+=255
elif [ $i -eq $full_octets ]; then
mask+=$((256 - 2**(8-$partial_octet)))