Skip to content

Instantly share code, notes, and snippets.

View mikelyons's full-sized avatar
🌏
Write the code, change the world

Mike Lyons mikelyons

🌏
Write the code, change the world
View GitHub Profile
@liamdon
liamdon / gist:2467603
Created April 22, 2012 23:53
CoffeeScript, Jade and Stylus syntax highlighting in Sublime Text 2

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus

Step 2: Restart Sublime Text 2

@sent-hil
sent-hil / pictures.markdown
Created August 24, 2012 02:18
River (getriver.com): Keep a programming journal.

One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.

At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:

  • Todo
  • Question
  • Thought
  • Bug
  • Feature
@johnjohndoe
johnjohndoe / pre-commit.sh
Created November 6, 2012 11:48
Git pre-commit hook to add a new line at the end of a file and remove trailing whitespaces
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# Usage:
# Remove the .sh file extension when you put the script in your hooks folder!
#
@rab
rab / .gitconfig
Last active May 14, 2024 07:05
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
<!DOCTYPE html>
<html>
<head><title>ChamberedTest</title></head>
<script type="text/javascript" src="js/chambered.js"></script>
<style type="text/css">
canvas, img {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
@cbednarski
cbednarski / gist:4555141
Created January 17, 2013 10:37
Sublime Text keymap, which fixes the really annoying Ctrl+Tab order behavior
[
{ "keys": ["ctrl+shift+t"], "command": "open_terminal_project_folder" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

When I went to college, I fully immersed myself into many things, mostly related to Linux and Python. I learned more than I have in my entire life — yet I never went to class more than once a week. Obviously, that isn't sustainable, so I dropped out, moved back home, and sold all of my "distractions" — namely my camera and related things. I was left with the essential: a simple computer. The plan was to go back to my old job at McDonalds and slowly save up money to go back to school and refocus.

This was a pretty dark time in my life. I went through a few different jobs, all terrible. But everything changed when I met some fascinating people in my town at the local coworking center.

These were people that were interested in the things I cared about — software, servers, programming, the internet, and people. They were genuinely interested in my opinion of the things they were building. That changed everything for me. I was valuable to them. The next day, I formally decided that I wasn't going to return to sc

@mdobson
mdobson / gist:5807345
Last active December 18, 2015 15:49
create book in obj-c
UGClientResponse *response = [self.client createEntity:book];
//Lets check if our response was accepted by the server, and add the created object to a collection called _objects
if (response.transactionState == kUGClientResponseSuccess) {
[_objects insertObject:response.response[@"entities"][0] atIndex:0];
}
@mdobson
mdobson / gist:5807377
Last active December 18, 2015 15:49
Deleting a book
NSDictionary *entity = [_objects objectAtIndex:indexPath.row];
UGClientResponse * response = [self.client removeEntity:@"book" entityID:entity[@"uuid"]];
if (response.transactionState == kUGClientResponseSuccess) {
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}