Skip to content

Instantly share code, notes, and snippets.

View ferminhg's full-sized avatar
🐙
WFH

fermin ferminhg

🐙
WFH
View GitHub Profile
@hileon
hileon / gist:1311735
Created October 25, 2011 07:39 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@rd13
rd13 / gist:4454720
Created January 4, 2013 18:22
Simple Objective-C Timer Example
//Do something 2 seconds after view loads
- (void)viewDidLoad
{
[super viewDidLoad];
[NSTimer scheduledTimerWithTimeInterval:2.0
target:self
selector:@selector(theAction)
userInfo:nil
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@EffEPi
EffEPi / slack_delete.php
Created January 22, 2016 17:23
Delete Slack files older than 30 days that are not pinned. Rewrite of https://gist.github.com/jackcarter/d86808449f0d95060a40 . get your slack token here: https://api.slack.com/web
<?php
$token = '<YOUR TOKEN GOES HERE>';
#Delete files older than this:
$ts_to = time()-(30*24*3600);
function list_files($token, $ts_to){
$params = [
'token' => $token,
'ts_to' => $ts_to,