Skip to content

Instantly share code, notes, and snippets.

@loop
loop / Installed gems
Created July 26, 2014 21:17
Installed gems
actionmailer (4.0.2)
actionpack (4.0.2)
activemodel (4.0.2)
activerecord (4.0.2)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
arel (4.0.1)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
bigdecimal (1.2.3, 1.2.0)
1Password 4.app Maps.app
Adobe Messages.app
Adobe Acrobat XI Pro Microsoft Office 2011
Adobe Bridge CS6 Microsoft Silverlight
Adobe Extension Manager CS6 Mission Control.app
Adobe Illustrator CS6 Notes.app
Adobe Photoshop CS6 Numbers.app
Adobe Reader.app OpenGL Driver Monitor.app
App Store.app OpenGL Profiler.app
Automator.app OpenGL Shader Builder.app
Login
If you want to associate your gists with your GitHub account, you need to login with gist. It doesn't store your username and password, it just uses them to get an OAuth2 token (with the "gist" permission).
gist --login
Obtaining OAuth2 access_token from github.
GitHub username: ConradIrwin
GitHub password:
Success! https://github.com/settings/applications
This token is stored in ~/.gist and used for all future gisting. If you need to you can revoke it from https://github.com/settings/applications, or just delete the file.
class staticTest {
int x = 3;
int f (int z)class staticTest {
int x = 3;
int f (int z) {
return z+x;
}
public static void main(String[] args) {
staticTest test = new staticTest();
@loop
loop / gist:6151617
Created August 4, 2013 19:33
Disable and re-enable Spotlight icon. It will not disable Spotlight, just removes the icon only.
To disable:
sudo mv /System/Library/CoreServices/Search.bundle /System/Library/CoreServices/Search.bundle.bak
killall SystemUIServer
To re-enable:
sudo mv /System/Library/CoreServices/Search.bundle.bak /System/Library/CoreServices/Search.bundle
killall SystemUIServer
@loop
loop / tumblr.rb
Last active December 18, 2015 21:49
Modified Tumblr to Octopress migration script, more info - http://finitepost.com/2013/06/24/quick-start-guide-to-setting-up-octopress-from-tumblr/
require 'rubygems'
require 'open-uri'
require 'fileutils'
require 'nokogiri'
require 'date'
require 'json'
require 'uri'
require 'jekyll'
module Jekyll
@loop
loop / ExternalStorage.java
Created June 18, 2013 14:30
Class to find the path to External SD Card (removable storage).
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import android.os.Environment;
import android.util.Log;
@loop
loop / sticky footer.html
Last active December 18, 2015 04:49
Javascript to stick the footer to the bottom and let it stay there even if there isn't enough content to push the footer down.
class apples{
public static void main(String[] args) {
int firstarray[][]={{8,9,10,11},{12,13,14,15}};
int secondarray[][]={{30,31,32,33},{43},{3,4,5}};
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>Is the site down?</title>
<style type="text/css">
body{background-color:#fff;color:#333;font-family:Arial,Verdana,sans-serif;font-size:62.5%;margin:10% 5% 0 5%;text-align:center;}
a,a:visited,a:active{color:#0080ff;text-decoration:underline;}
a:hover{text-decoration:none;}