Skip to content

Instantly share code, notes, and snippets.

View mokagio's full-sized avatar
🛠️
Building stuff

Gio Lodi mokagio

🛠️
Building stuff
View GitHub Profile
@mokagio
mokagio / eragon-quote.md
Created June 27, 2014 10:32
Magic is a language for making and doing powerful things. Like coding!

“Yes, brisingr. ” The fire flared, and a shiver ran through Eragon. Something about the word made him feel incredibly alive. “I thought so. Brisingr is from an ancient language that all living things used to speak. However, it was forgotten over time and went unspoken for eons in Alagaësia, until the elves brought it back over the sea. They taught it to the other races, who used it for making and doing powerful things. The language has a name for everything, if you can find it.” “But what does that have to do with magic?” interrupted Eragon. “Everything! It is the basis for all power. The language describes the true nature of things, not the superficial aspects that everyone sees. For example, fire is called brisingr . Not only is that a name for fire, it is the name for fire. If you are strong enough, you can use brisingr to direct fire to do whatever you will.

From Eragon by Christopher Paolini

#!/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.
#
# Purposes:
# Add an empty line at the end of the file.
# Remove trailing spaces at the end of a line.
@mokagio
mokagio / gist:589a91a929ed79cb7686
Last active August 29, 2015 14:10
HipChat wishlist

Note: the following UX is from the Mac app only

  1. Direct download of attachments OR open in browser, at the moment when an attachment is opened the browser opens, but only to start the download.
  2. Markdown like syntax parsing, so _ italic _, ** bold **, and code can be used
  3. http://www.emoji-cheat-sheet.com/ compatibility (yep some of them might be competitors but it's almost a standard)
@mokagio
mokagio / keybase.md
Last active August 29, 2015 14:15
keybase.md

Keybase proof

I hereby claim:

  • I am mokagio on github.
  • I am mokagio (https://keybase.io/mokagio) on keybase.
  • I have a public key whose fingerprint is CE02 FC0E 27F5 15A8 F469 F293 BD68 D621 217B 303A

To claim this, I am signing this object:

@mokagio
mokagio / .env
Last active August 29, 2015 14:26
Configurable script to build and distribute iOS apps to TestFlight. It relies on deliver, https://github.com/KrauseFx/deliver, and xcpretty, https://github.com/supermarin/xcpretty.
# iTunes Connect username
DELIVER_USER=my.apple.id@mail.com
# iTunes Connect password
DELIVER_PASSWORD=password
@mokagio
mokagio / reveal-cask-lldb
Created September 25, 2015 04:18
Reveal LLDB command aliases, for Homebrew Cask installations
# Reveal LLDB aliases
# See http://blog.ittybittyapps.com/blog/2013/11/07/integrating-reveal-without-modifying-your-xcode-project/ for process explanation
command alias reveal_load_sim expr (Class)NSClassFromString(@"IBARevealLoader") == nil ? (void *)dlopen("/opt/homebrew-cask/Caskroom/reveal/latest/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2) : ((void*)0)
command alias reveal_load_dev expr (Class)NSClassFromString(@"IBARevealLoader") == nil ? (void *)dlopen([(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2) : ((void*)0)
command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];
//
// IPInsetLabel.h
// Instapaper
//
// Created by Marco Arment on 7/23/11.
// Copyright 2011 Instapaper LLC, released to the public domain.
//
#import <UIKit/UIKit.h>
@mokagio
mokagio / Guardfile
Created March 5, 2013 21:44 — forked from l4u/Guardfile
guard :shell do
watch(%r{-hd\.png$}) do |m|
input = m[0]
output = input.gsub(/-hd.png$/,'.png')
puts "Downsizing #{input} to #{output}"
`convert #{input} -resize 50% #{output}`
end
end
@mokagio
mokagio / MCSpriteLayer.h
Created May 21, 2013 22:08
MCSpriteLayer, core component to create sprite sheet based animation. See http://mysterycoconut.com/blog/2011/01/cag1/
#import <QuartzCore/QuartzCore.h>
@interface MCSpriteLayer : CALayer {
unsigned int sampleIndex;
}
@property (readwrite, nonatomic) unsigned int sampleIndex;
@mokagio
mokagio / .gitignore
Last active December 17, 2015 20:19
.gitignore for advanced Objective-C workflow with CocoaPods and AppCode
# OSX stuff
.DS_Store
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3