GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
This file contains hidden or 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/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'pony' | |
require 'text-table' | |
# We write a file with the following format: | |
# ip_address,mac_address,accepted,alerted,first_seen_timestamp | |
email_to_alert = "email" | |
gmail_username = 'email' | |
gmail_app_password = 'password' |
This file contains hidden or 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
perl -e 'use utf8; binmode STDOUT, ":encoding(UTF-8)"; no bytes; my $c = "\x{1F0A1} \x{1F0B1} amazon \x{1F0C1} \x{1F0D1}"; use POSIX; my $L = floor(length($c)/2); my $z = 0; for $x (1..50) { for $y (1..50) { $z = !$z; if ($x == 25 && $y == (25 - $L)) { print "$c"; } if ($x == 25 && $y >= (25 - $L) && $y <= (25 + $L - !(length($c) % 2))) { next; } if ($z) { print "."; } else { print " "; } }; $z = !$z; print "\n"; }' | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . | |
. . . . . . . . . . . . . . . . . . . . . . . . . |
This file contains hidden or 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 | |
COMMAND=$1 | |
FILENAME=$2 | |
FILESIZE=$3 | |
usage() { | |
echo "Usage: ./simpleluks.sh command [args ...]" | |
echo " ./simpleluks.sh create some_name size_in_GB" | |
echo " ./simpleluks.sh open some_name" | |
echo " ./simpleluks.sh close some_name" | |
} |
This file contains hidden or 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 | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
This file contains hidden or 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 apt-get install libsnappy-dev | |
wget https://leveldb.googlecode.com/files/leveldb-1.9.0.tar.gz | |
tar -xzf leveldb-1.9.0.tar.gz | |
cd leveldb-1.9.0 | |
make | |
sudo mv libleveldb.* /usr/local/lib | |
cd include | |
sudo cp -R leveldb /usr/local/include |
This file contains hidden or 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 unicodedata | |
with open("steam_crash.txt", 'rb') as myfile: | |
message = myfile.read() | |
print('Length of message in bytes: ' + str(len(message))) | |
message = message.decode('utf-8') | |
print('Number of characters in message: ' + str(len(message))) | |
This file contains hidden or 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
''' | |
USAGE: | |
Use python3 | |
Place addresses to track, one per line, in addresses.txt | |
Place assetchains to track, one per line, in assets.txt | |
Adjust balance_threshold and send_amount as needed | |
If you need to specify an alternative komodo_cli location, either pass it as the first argument | |
when invoking the script, or change the komodo_cli variable. | |
''' |