This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <algorithm> | |
class One { | |
protected: | |
int a; | |
int b; | |
}; | |
class Two : public One { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <algorithm> | |
class One { | |
protected: | |
int a; | |
int b; | |
}; | |
class Two : public One { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <algorithm> | |
class One { | |
protected: | |
int a; | |
int b; | |
}; | |
class Two : public One { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update packages | |
apt-get update && apt-get install emacs24-nox mcrypt | |
# setup Postgres | |
apt-get install postgresql postgresql-contrib libpq-dev | |
# setup Nginx | |
apt-get install nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BACKUPING=`git remote show origin -n | grep "Fetch URL:" | sed -E 's:^.*/(.*):\1:'` | |
git archive -9 HEAD -o ../${BACKUPING}.committed.zip | |
git ls-files -o | zip ../${BACKUPING}.backup-uncommitted.zip -@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rdflib,urllib,json | |
g = rdflib.Graph() | |
g.parse("tabmix_sessions-2017-08-28.rdf") # replace with your own | |
links = {} | |
for obj in g.objects(): | |
try: | |
if 'http' in obj: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
networks: | |
shout: | |
external: | |
name: web | |
whisper: {} | |
services: | |
traefik: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
networks: | |
shout: | |
external: | |
name: web | |
whisper: {} | |
services: | |
traefik: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#1. See what partition is full: | |
df -h | |
#2. Find largest directories: | |
du -hax / 2> /dev/null | sort -rh | head -n 20 | |
#3. Find fattest files: | |
find . -type f -printf "%s\t%p\n" | sort -n | tail -n 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# LJ links extractor | |
# (c) 2018 by ReCoder (recoder.livejournal.com) | |
import argparse | |
import datetime | |
import urllib, urlparse | |
from lj import lj | |
from BeautifulSoup import BeautifulSoup |
OlderNewer