Skip to content

Instantly share code, notes, and snippets.

@raphaelhanneken
raphaelhanneken / NSImageExtensions.swift
Last active August 24, 2023 01:04
NSImage extensions for easy resizing, cropping and saving png images.
//
// NSImageExtensions.swift
//
import Cocoa
extension NSImage {
/// The height of the image.
var height: CGFloat {
@doole
doole / ruby_centos6.sh
Last active April 13, 2017 21:19
Ruby/Rails setup on CentOS 6.x with Vagrant
#!/bin/bash
# Vagrant CentOS6 boxes
# CentOS 6.4 x64 https://github.com/2creatives/vagrant-centos/releases/download/v6.4.2/centos64-x86_64-20140116.box
# CentOS 6.5 x64 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box
# Update
sudo yum -y update
# Add Development tools
@rxaviers
rxaviers / gist:7360908
Last active May 5, 2024 08:25
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@tyrone-sudeium
tyrone-sudeium / copy_propertyList_recursive.mm
Created February 25, 2013 01:15
Same as the built-in class_copyPropertyList except it traverses the class hierarchy too.
static objc_property_t* class_copyPropertyList_recursive(Class aClass, unsigned int *outCount)
{
unsigned int total = 0;
objc_property_t *contiguousList = nil;
objc_property_t *ptr = nil;
unsigned int ptrOffset = 0;
unsigned int listLen = 0;
unsigned int const increment = 32;
contiguousList = malloc(sizeof(objc_property_t) * increment);
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
-- Alan Kay
Premature optimization is the root of all evil (or at least most of it)
in programming.
-- Donald Knuth
Lisp has jokingly been called "the most intelligent way to misuse a
computer". I think that description is a great compliment because it