Skip to content

Instantly share code, notes, and snippets.

View zackexplosion's full-sized avatar
🏠
Working from home

Zack zackexplosion

🏠
Working from home
View GitHub Profile
  1. Choose: Tools > New Plugin

  2. Paste in the contents of "timestamp.py" below

  3. Save as timestamp.py in ~/Library/Application Support/Sublime Text 2/Packages/User/ (should be the default directory that pops up when you save)

  4. Choose: Sublime Text 2 > Preferences > Key Bindings - User

  5. Add:

    { "keys": ["super+ctrl+t"], "command": "timestamp" }

To make command+ctrl+t perform the insertion.
Make sure to add a comma after the previous keymap entry, if present.

@zackexplosion
zackexplosion / oopExample.php
Last active December 21, 2015 07:28
an oop example
<?php
//宣告『狗』物件
class Dog{
//宣告『狗吠』方法
function bark(){
//讓『狗』叫
echo '幹!'; // http://www.youtube.com/watch?v=NhqOcOetx2w
}
}
@zackexplosion
zackexplosion / plurk_emotion_no_sapce
Created August 24, 2013 10:41
remove plurk custom enmotion spacing
.text_holder .emoticon_my{
margin-right:-4px;
}
@zackexplosion
zackexplosion / android java
Created October 10, 2013 07:30
android load image from url
URL url = null;
Bitmap bmp = null;
try {
url = new URL("https://avatars.plurk.com/3779689-big44.jpg");
bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

<h1>hello</h1>
<?php
if('tori' === 'gay'){
echo 'yooooooooooooooooo';
}
?>
<?php if('tori' === 'gay'): ?>
yooooooooooooooooo <!-- this is html code -->
<?php endif;?>
var http = require('http');
var base = 'http://www.fighter.com.tw/updata/down_files/';
var patterns = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split('');
// var patterns = "ABC".split('');
var password_length = 2;
var level = 0;
var total_length = Math.pow(patterns.length , password_length);
@zackexplosion
zackexplosion / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#include <string.h>
int main(int argc,char*argv[]) {
char CommandBuf[20];
int a,b,sum;
fprintf(stderr,"Please enter a number:");
fgets(CommandBuf,20,stdin);
a = atoi(CommandBuf);
default: &default
adapter: postgresql
encoding: unicode
host: localhost
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5
development:
<<: *default