Skip to content

Instantly share code, notes, and snippets.

d̷o̷n̷'̷t̷ ̷e̷v̷e̷n̷ ̷t̷r̷y̷ ̷t̷o̷ ̷b̷o̷t̷h̷e̷r̷ ̷m̷e̷

Svetlana Linuxenko linuxenko

d̷o̷n̷'̷t̷ ̷e̷v̷e̷n̷ ̷t̷r̷y̷ ̷t̷o̷ ̷b̷o̷t̷h̷e̷r̷ ̷m̷e̷
  • ⓡⓐⓖⓤⓛⓐⓝⓓ
View GitHub Profile
View cidr2mask
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
elif [ $i -eq $full_octets ]; then
mask+=$((256 - 2**(8-$partial_octet)))
View hosts.txt
# AdAway default blocklist
# Blocking mobile ad providers and some analytics providers
# Contribute:
# Create an issue at
# Changelog:
# 2016-07-18 Now hosted on GitHub + Cloudflare
# 2014-05-18 Now with a valid SSL certificate available at
# 2013-03-29 Integrated some hosts from
View shiftout.c
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)));
digitalWrite(dataPin, !!(val & (1 << (7 - i))));
linuxenko / A Personal Portfolio Webpage [freeCodeCamp [Basic Projects]] (Challenge).markdown
Created Mar 25, 2016
A Personal Portfolio Webpage [freeCodeCamp [Basic Projects]] (Challenge)
View A Personal Portfolio Webpage [freeCodeCamp [Basic Projects]] (Challenge).markdown

A Personal Portfolio Webpage [freeCodeCamp [Basic Projects]] (Challenge)

Objective: Build a app that is functionally similar to this: Rule #1: Don't look at the example project's code. Figure it out for yourself. Rule #2: Fulfill the below user stories. Use whichever libraries you need. Give it your own personal style. User Story: I can access all of the portfolio webpage's content just by scrolling. User Story: I can click different buttons that will take me to the portfolio creator's different social media pages. User Story: I can see thumbnail images of different projects the portfolio creator has built (if you haven't built any websites before, use placeholders.) User Story: I navigate to different sections of the webpage by clicking buttons in the navigation.

View fcgi-fpm.conf
<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
(function(console){ = function(data, filename){
if(!data) {
console.error(' No data')
if(!filename) filename = 'console.json'
View conky run
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
View groupbasedroute.txt
# 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 / client.conf
Created Nov 20, 2017
vkontakte openvpn rules
View client.conf
## vk