A tab completion script that works for Bash. Relies on the BSD md5
command on Mac and md5sum
on Linux, so as long as you have one of those two commands, this should work.
$ gradle [TAB]
byte[].metaClass.hexdump { int idx, int len -> | |
println ''' +--------------------------------------------------+ | |
| | 0 1 2 3 4 5 6 7 8 9 a b c d e f | | |
| +----------+--------------------------------------------------+------------------+'''.stripMargin() | |
delegate[ idx..<(idx+len) ].with { bfr -> | |
def bytes = bfr.collect { String.format( '%02x', it ) } | |
.collate( 8 ) | |
.collate( 2 ) | |
.collect { a, b -> ( a + [ '' ] + b ).join( ' ' ).padRight( 48, ' ' ) } | |
def ascii = bfr.collect { it > 0x1f && it < 0x7f ? (char)it : '.' } |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
-480p - Run tenfoot in 480p rather than 1080p | |
-720p - Run tenfoot in 720p rather than 1080p | |
-accesscode - | |
-all_languages - show longest loc string from any language | |
-bigpicture - Start in Steam Big Picture mode | |
-blefw - | |
-cafeapplaunch - Launch apps in a cyber cafe context | |
-candidates - Show libjingle candidates for local connection as they are processed | |
-ccsyntax - Spew details about the localized strings we load | |
-cef-delaypageload - Enable early-out for known page loads |
#!/bin/sh | |
in_place() { | |
content="$1" | |
file="$2" | |
id="$3" | |
range="/^#${id} START\$/,/^#${id} END\$/" | |
[ -f "$file" ] && [ -n "$(tail -c 1 "$file")" ] && echo >>"$file" | |
{ rm -- "$file" && sed "${range}d" >"$file"; } <"$file" && sed -n "${range}p" >>"$file" <"$content" | |
} | |
in_place "$0" "$HOME/.profile" 'Jump marks .profile' |
#!/bin/sh | |
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $ | |
# This script starts an instance of Xvfb, the "fake" X server, runs a command | |
# with that server available, and kills the X server when done. The return | |
# value of the command becomes the return value of this script, except in cases | |
# where this script encounters an error. | |
# | |
# If anyone is using this to build a Debian package, make sure the package |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
#!/usr/bin/env ruby | |
require 'yaml' | |
TYPE_TO_KSY = { | |
'uint8_t' => 'u1', | |
'uint16_t' => 'u2', | |
'uint32_t' => 'u4', | |
'uint64_t' => 'u8', |
(especially while expanding)
Warning: The exact commands may not match for your particular linux OS / Synology(NAS) device. I had to customize the commands after exploring my particular system's setup.
If you're new to linux, or this is a new piece of hardware / a new synology device, jump down to the section called "Inspecting a setup"
<plist version="1.0"> | |
<dict> | |
<key>pings</key> | |
<array /> | |
<key>jingleDocType</key> | |
<string>purchaseSuccess</string> | |
<key>jingleAction</key> | |
<string>purchaseProduct</string> | |
<key>status</key> | |
<integer>0</integer> |