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
/** | |
`result = prompt2([prompt , options|default]);` | |
Generic function that extends `window.prompt()`. | |
If `options.validate()` is provided, this function will loop until the function return true on user's input. | |
Empty string (`''`) will be used instead of passing `undefined` for `prompt` and `default`. | |
If an non-Object is passed for options, it will be used as default value | |
(compatible with `window.prompt()`, no validation is performed). Use |
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 | |
REPOS_PREFIX="https://github.com" | |
REPOS=( \ | |
"cm42semc/android_build" \ | |
"cm42semc/android_external_bluetooth_bluedroid" \ | |
"cm42semc/android_external_bluetooth_bluez" \ | |
"cm42semc/android_external_bluetooth_glib" \ | |
"cm42semc/android_external_bluetooth_hcidump" \ |
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
# This function defines a 'cd' replacement function capable of keeping, | |
# displaying and accessing history of visited directories, up to 10 entries. | |
# To use it, uncomment it, source this file and try 'cd --'. | |
# acd_func 1.0.5, 10-nov-2004 | |
# Petar Marinov, http:/geocities.com/h2428, this is public domain | |
cd_func () | |
{ | |
local x2 the_new_dir adir index | |
local -i cnt |
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 | |
# | |
# URI parsing function | |
# | |
# The function creates global variables with the parsed results. | |
# It returns 0 if parsing was successful or non-zero otherwise. | |
# | |
# [schema://][user[:password]@]host[:port][/path][?[arg1=val1]...][#fragment] | |
# |
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 | |
[[ ${COLORS_SOURCE} ]] && source ${COLORS_SOURCE} | |
EXEC_CMD= | |
SCRIPT=$(basename $0) | |
_BSCRIPT=${_BLD}${SCRIPT}${_RST_} | |
function _help() | |
{ |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell] | |
@="Open &PowerShell Here" | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command] | |
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell] | |
@="Open &PowerShell Here" |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\sublime] | |
@="Open Folder as &Sublime Project" | |
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command] | |
@="\"B:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\"" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime] | |
@="Open Folder as &Sublime Project" |
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
Windows Registry Editor Version 5.00 | |
# replaces notepad | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe] | |
"Debugger"="\"B:\\Program Files\\Notepad2\\Notepad2.exe\" /z" | |
# context menu shortcut | |
[HKEY_CLASSES_ROOT\*\shell\Open with Notepad2] | |
@="Open with &Notepad2" |
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 | |
# | |
# path parsing function built purely from bash | |
# http://stackoverflow.com/a/18455930/665507 | |
# | |
function path() { | |
SAVEIFS=$IFS; IFS="" # stash IFS for safe-keeping, etc. | |
[[ $# != 2 ]] && echo "usage: path <path> <dir|name|fullname|ext>" && return # demand 2 arguments | |
[[ $1 =~ ^(.*/)?(.+)?$ ]] && { # regex parse the path |
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 | |
# sanity checks | |
if ARGV.count == 0 | |
puts "You must provide a file name" | |
return | |
elsif File.exist?(ARGV.first) == false | |
puts "That file doesn't exist" | |
return | |
end |
OlderNewer