Skip to content

Instantly share code, notes, and snippets.

@loop
loop / hack.sh
Created May 13, 2012 09:52 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@loop
loop / .gitignore for android projects in eclipse
Created September 5, 2012 21:32
Ignoring eclipse and android files
*.pydevproject
.project
.metadata
bin/**
gen/
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
<!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;}
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}};
}
}
@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.
@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 / 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 / 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
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();
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.