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
local awful = require("awful") | |
local wibox = require("wibox") | |
local gears = require("gears") | |
local clients_hints = {} | |
local clients_widgets = {} | |
local clients_texts = {} | |
local hints = {} | |
local hints_tree = {} | |
local registered = false |
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
sudo xfsdump -L KW12 -M FullBackup -J - / |lzop > /media/oli/465GB/Backup/Oli/Vostro/Linux-xfsdump-2016-03-26.lzo | |
## Explanation: | |
# sudo xfsdump | |
# -> start the xfsdump programm with root privileges | |
# -L KW12 | |
# -> gives the Backup the label KW12 | |
# -M FullBackup |
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
""" | |
Environment variable context manager | |
------------------------------------ | |
Support utility for managing environments in which e.g. git is run | |
""" | |
import os | |
from contextlib import contextmanager | |
from functools import wraps |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
- A Russian translation of this article can be found here, contributed by Timur Demin.
- A Turkish translation can be found here, contributed by agyild.
- There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MB 1048576 | |
#define CONSUME 10 * MB | |
// Usage: ./memory-eater {total MB} {sleep seconds} | |
// eg ./memory-eater 700 30 to consume 700MB for 30 secs |
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
# save it as /etc/profile.d/ssh-telegram.sh | |
# use jq to parse JSON from ipinfo.io | |
# get jq from here http://stedolan.github.io/jq/ | |
USERID="<target_user_id>" | |
KEY="<bot_private_key>" | |
TIMEOUT="10" | |
URL="https://api.telegram.org/bot$KEY/sendMessage" | |
DATE_EXEC="$(date "+%d %b %Y %H:%M")" | |
TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt' | |
if [ -n "$SSH_CLIENT" ]; then |
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
require 'csv' | |
require 'twitter' | |
def twitter_client | |
@twitter_client ||= Twitter::REST::Client.new do |config| | |
config.consumer_key = 'XXXXXX' | |
config.consumer_secret = 'XXXXXX' | |
config.access_token = 'XXXXXX' | |
config.access_token_secret = 'XXXXXX' | |
end |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
NewerOlder