Skip to content

Instantly share code, notes, and snippets.

@segiddins
segiddins / ImageColors.py
Created Dec 16, 2012
Python script to return the dominant colors in an image, along with opening a webpage containing paint chips of them
View ImageColors.py
#!/usr/bin/python
from collections import namedtuple
from math import sqrt
import random
import os
import sys
import time
from PIL import Image
View repod
#!/bin/sh
# ~/bin/repod
set -e
if [ ! -e Podfile ]; then
echo "Podfile not found" >&2
exit 1
fi
if [ -z "$1" ]; then
echo "Missing pod to reinstall" >&2
View gist:8ba2e42a428014d83e61
find /Applications /Applications/Utilities -maxdepth 1 -name "*.app" | while read a ; do codesign -vd "${a}" 2>&1 | awk '/version/ {print $3}' ; done | sort | uniq -c
@segiddins
segiddins / awesome.json
Last active Aug 29, 2015
Resolver Specs format
View awesome.json
{
"rack": [
{
"name": "rack",
"version": "0.8",
"platform": "ruby",
"dependencies": {
}
},
{
@segiddins
segiddins / Gemfile
Last active Aug 29, 2015
PNG of Dependency Graph
View Gemfile
gem 'ruby-graphviz'
@segiddins
segiddins / gen.rb
Created Nov 25, 2014
Generate Molinillo integration spec indices from CocoaPods
View gen.rb
require 'cocoapods'
master = Pod::SourcesManager.master.first
pods = {}
# names = master.pods
names = %w(AFAmazonS3Client AFNetworking AFOAuth2Client CargoBay)
names.each do |n|
@segiddins
segiddins / update_shared
Last active Nov 1, 2015
Update web repos' shared submodule
View update_shared
#!/usr/bin/env ruby
SHARED_PATH = 'shared'
Dir.glob('*segiddins.me').each do |repo|
Dir.chdir repo do
unless `command git status` =~ /working directory clean/
puts "The working directory for #{repo} is dirty"
end
pull = ''
shared_sha = ''
View gems_to_molinillo_specs.rb
#!/usr/bin/ruby
require 'json'
require 'open-uri'
gems = %w(rails capybara bundler)
specs = []
begin
View keybase.md

Keybase proof

I hereby claim:

  • I am segiddins on github.
  • I am segiddins (https://keybase.io/segiddins) on keybase.
  • I have a public key ASBUfziuAe8qODgXz8UeuEIre6ZlOV8BdSUn4RcyApdEYAo

To claim this, I am signing this object:

View drop.swift
func drop<S: SequenceType, T where S.Generator.Element == T>(sequence: S, count: Int) -> GeneratorOf<T> {
var generator = sequence.generate()
for _ in 0..<count {
generator.next()
}
return GeneratorOf<T>(generator)
}