Skip to content

Instantly share code, notes, and snippets.

import UIKit
extension UIImage {
// colorize image with given tint color
// this is similar to Photoshop's "Color" layer blend mode
// this is perfect for non-greyscale source images, and images that have both highlights and shadows that should be preserved
// white will stay white and black will stay black as the lightness of the image is preserved
func tint(tintColor: UIColor) -> UIImage {
@pudquick
pudquick / 00 - Converting older Python.framework Xcode projects for Xcode 6.md
Last active August 6, 2022 16:07
An example of converting an older python.Framework Xcode project to compile in Xcode 6

When Apple moved to Xcode 5 (and later 6), they changed how you embed the Python.framework in a project: https://developer.apple.com/library/mac/technotes/tn2328/_index.html

This is a basic walkthrough of the process of conversion per that documentation for Xcode 6.

The example used here is the latest version of grahamgilbert's Crypt (at the time of this writeup): https://github.com/grahamgilbert/Crypt/tree/bdd49c849ed07fbc86d8c6f5bc31a525061d5077

(If you're viewing this via a gist blogging platform like roughdraft.io, make sure to view the original gist as there are image files included within the steps)

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 10, 2024 03:45
A badass list of frontend development resources I collected over time.
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
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:

@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active September 24, 2024 14:52 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@loonies
loonies / 1_phpunit-api.md
Last active September 24, 2024 14:55
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
@kwellman
kwellman / gist:632442
Created October 18, 2010 15:44
lxml_readability.py
"""An lxml Port of Nirmal Patel's port (http://nirmalpatel.com/fcgi/hn.py) of
Arc90's Readability to Python.
"""
import re
from lxml.html import fromstring, tostring
from lxml.html.clean import Cleaner
NEGATIVE = re.compile('comment|meta|footer|footnote|foot')
POSITIVE = re.compile('post|hentry|entry|content|text|body|article')