Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mokkun
mokkun / .skhdrc
Last active February 10, 2018 10:14
Update commands to use hyper key
# close focused window
hyper - w : chunkc tiling::window --close
# focus window
hyper - h : chunkc tiling::window --focus west
hyper - j : chunkc tiling::window --focus south
hyper - k : chunkc tiling::window --focus north
hyper - l : chunkc tiling::window --focus east
# equalize size of windows

Keybase proof

I hereby claim:

  • I am mokkun on github.
  • I am mokkun (https://keybase.io/mokkun) on keybase.
  • I have a public key whose fingerprint is A32D E47C 1A51 084E 909E 7188 0BCF D68C 5A25 0CCD

To claim this, I am signing this object:

buildscript {
repositories {
// rather than hit central each time with this:
// mavenCentral()
// we hit our company Nexus server ont he public group
// which includes the Central Repository
// and is local, so more performant
maven {
url "http://localhost:8081/nexus/content/groups/public"
}
<?php
$target_path = "images/";
$target_path = $target_path . basename($_FILES['file']['name']);
if (move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['file']['name']) . " has been uploaded";
} else {
echo "There was an error uploading the file, please try again!";
@mokkun
mokkun / gist:807825
Created February 2, 2011 15:17
Simple example of how to post a message using the Facebook SDK. I'm assuming that the user is already logged in.
Context context = this.getApplicationContext();
Facebook facebook = new Facebook(YOUR_FACEBOOK_ID);
AsyncFacebookRunner facebookAsync = new AsyncFacebookRunner(facebook);
Handler facebookHandler = new Handler();
SessionStore.restore(facebook, context);
Bundle params = new Bundle();
params.putString("message", "This is my message.");
facebookAsync.request("me/feed", params, "POST", new RequestListener() {