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
typeset -A escape_map | |
escape_map[_\\]='\\' | |
for code escape ( | |
0 C@ 1 Ca 2 Cb 3 Cc 4 Cd 5 Ce 6 Cf 7 a | |
8 b 9 t 10 n 11 v 12 f 13 r 14 Cn 15 Co | |
16 Cp 17 Cq 18 Cr 19 Cs 20 Ct 21 Cu 22 Cv 23 Cw | |
24 Cx 25 Cy 26 Cz 27 e 28 'C\\' 29 'C]' 30 'C^' 31 C_ | |
) { |
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 | |
while getopts "h" option; do | |
case "$option" in | |
h) | |
echo "termbin - Create pastes on termbin.com" | |
echo | |
echo "Usage: termbin [OPTIONS] [FILE] [FILE] ..." | |
echo | |
echo "Options:" |
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 | |
SCRIPT_NAME="$(basename "$0")" | |
if [ "$SCRIPT_NAME" != "urlencode" ] && [ "$SCRIPT_NAME" != "urldecode" ]; then | |
echo 'Please run this script as "urlencode" or "urldecode"' | |
exit 1 | |
fi | |
if [ $# -lt 1 ]; then |
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
<?php | |
// | |
// Get all variables from a PHP script. | |
// | |
// Warning: This is probably not a good idea security-wise. | |
// | |
// Usage: | |
// | |
// Let's say you have a script called 'test.php', which contains the following: |
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 python3 | |
import re | |
import sys | |
import argparse | |
import unicodedata | |
if len(sys.argv) == 1: | |
sys.argv.append('-h') |
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
use std::io::{Read, Write, stdin, stdout}; | |
enum State { | |
Normal, | |
Utf8( | |
/// total number of bytes in the sequence | |
usize, | |
/// number of bytes left to read | |
usize, | |
/// code point (accumulated) |
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/bash | |
# Toggle yakuake's window; if it's not running, start it and then show the window. | |
# (So you don't have to reopen it manually in case you accidentally closed it.) | |
# | |
# To use this script, install it to /usr/local/bin/toggle-yakuake, then disable | |
# yakuake's global shortcut, and create a global shortcut pointing to this script. | |
# | |
# Written by André Kugland |
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
#include <inttypes.h> | |
typedef union { | |
uint64_t u64; | |
uint8_t u8[8]; | |
} uint64_union; | |
__attribute__((optimize("Os"))) // Avoid loop unrolling. | |
void reflect_u64(uint64_t* value) | |
{ |
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/share/libalpm/hooks/remove-baloo.hook | |
[Trigger] | |
Operation = Install | |
Operation = Upgrade | |
Operation = Remove | |
Type = Package | |
Target = * | |
[Action] |
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
// ==UserScript== | |
// @name Dicionário Analógico Aulete (correções) | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Corrige alguns problemas na página do dicionário analógico Aulete. | |
// @author You | |
// @match http://*.aulete.com.br/analogico/* | |
// @match https://*.aulete.com.br/analogico/* | |
// @grant none | |
// ==/UserScript== |