git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# YAML -> CouchDB fixture loader for Rails | |
# ======================================== | |
# by Jiri Stransky (http://twitter.com/jistr) | |
# for use with testing database instances only ;) | |
# | |
# What it does: | |
# * Loads fixtures from "test/fixtures" directory. | |
# * Permits use of ERB in the fixtures. | |
# * Uses CouchRest. | |
# |
/** | |
* Convenience method to create a MediaPlayer for a given resource id. | |
* On success, {@link #prepare()} will already have been called and must not be called again. | |
* <p>When done with the MediaPlayer, you should call {@link #release()}, | |
* to free the resources. If not released, too many MediaPlayer instances will | |
* result in an exception.</p> | |
* | |
* @param context the Context to use | |
* @param resid the raw resource id (<var>R.raw.<something></var>) for | |
* the resource to use as the datasource |
public static String sha1(String s, String keyString) throws | |
UnsupportedEncodingException, NoSuchAlgorithmException, | |
InvalidKeyException { | |
SecretKeySpec key = new SecretKeySpec((keyString).getBytes("UTF-8"), "HmacSHA1"); | |
Mac mac = Mac.getInstance("HmacSHA1"); | |
mac.init(key); | |
byte[] bytes = mac.doFinal(s.getBytes("UTF-8")); | |
pm list packages -f |
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file, a complete list of statements and | |
## options please have a look in the monit manual. |
/** | |
* NOTES: | |
* - iOS: the useful macros are defined within TargetConditionals.h | |
* - Android: | |
* - with Android.mk file(s) and the 'ndk-build' script (aka vanilla way), | |
* ANDROID is predefined (see -DANDROID extra C flag), | |
* - with the Android Standalone Toolchain __ANDROID__ is predefined instead | |
*/ | |
#if defined(__APPLE__) | |
#include <TargetConditionals.h> |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Subject: Thanks for signing up! | |
Date: {{date}} | |
To: {{recipient}} | |
From: {{sender}} | |
MIME-Version: 1.0 | |
Content-Type: text/plain | |
Thanks for signing up for the Foobar service! | |
Your email address is: {{recipient}} |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.filename = @"file.ext"; | |
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentDir = [documentPaths objectAtIndex:0]; | |
self.filePath = [documentDir stringByAppendingPathComponent:self.filename]; | |
[self createAndCheckDatabase]; |
# cangjie5.custom.yaml | |
# save it to: | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
patch: | |
"key_binder/bindings": | |
- { when: composing, accept: Return, send: Escape } | |
- { when: has_menu, accept: semicolon, send: 2 } |