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
@for /r %i in (*.bc!) do @move "%~fi" "%~dpni" |
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
function uri-encode { | |
echo "$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$1")" | |
} | |
function google-image-search { | |
echo "https://www.google.com/search?q=$(uri-encode "$*")&safe=off&espv=210&es_sm=93&source=lnms&tbm=isch&sa=X&ei=5tSGUrn9G4my2wWlhYDIAQ&ved=0CAkQ_AUoAQ&biw=1360&bih=944" | |
} |
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 python | |
""" This module consists of several classes that help with image management | |
and image manipulation. It also contains several functions that together | |
make up complete program, and therefore this module can be executed as a | |
script itself. It also contains a work-in-progress shell for performing | |
many of the available operations interactively. | |
@author: Cliff Braton | |
@contact: [email protected] | |
""" |
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
var PKT_D = "getpocket.com"; | |
var PKT_STATUS = "3"; | |
try { | |
if (ISRIL_TEST) {} | |
} catch (e) { | |
ISRIL_TEST = false | |
} | |
var PKT_BM_OVERLAY = function (e) { | |
this.inited = false; | |
this.saveTagsCallback = e.saveTagsCallback |
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 | |
FRESHMEAT_TOKEN=xtJ4zwGPM14iBmKnledd | |
DATA="auth_code=$FRESHMEAT_TOKEN" | |
ROOT="http://freshmeat.net" | |
function get { | |
[ -z "$1" ] && echo "Error: Must supply request path." && return | |
echo $(curl -G -d $DATA $ROOT/${1}) | |
} |
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
@rem Do not use "echo off" to not affect any child calls. | |
@setlocal | |
@rem Get the abolute path to the parent directory, which is assumed to be the | |
@rem Git installation root. | |
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI | |
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH% | |
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% | |
@if not exist "%HOME%" @set HOME=%USERPROFILE% |
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
package com.xxx.xxx.preference; | |
import java.text.DateFormat; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; | |
import android.content.Context; | |
import android.content.res.TypedArray; |
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
public static Map<String, String> getHashMapResource(Context c, int hashMapResId) { | |
Map<String, String> map = null; | |
XmlResourceParser parser = c.getResources().getXml(hashMapResId); | |
String key = null, value = null; | |
try { | |
int eventType = parser.getEventType(); | |
while (eventType != XmlPullParser.END_DOCUMENT) { |
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
# gem install bitbucket_rest_api | |
# gem install octokit | |
require 'bitbucket_rest_api' | |
require 'octokit' | |
task :migrate do | |
bitbucket = BitBucket.new login: '', password: '' | |
bitbucket_owner = '' | |
github = Octokit::Client.new login: '', password: '' | |
github_org = '' |
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
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |