Skip to content

Instantly share code, notes, and snippets.

View alloy's full-sized avatar

Eloy Durán alloy

View GitHub Profile
@indirect
indirect / gist:631628
Created October 18, 2010 02:49
improved git prompt yay
# [andre ~/.bash](master)$ # clean working directory
# [andre ~/.bash](master⚡)$ # dirty working directory
# [andre ~/.bash](master~2)$ # checked out revision not a branch
# [andre ~/.bash](branch)$ # checked out branch with same commits as master
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "⚡"
}
function parse_git_branch {

http://homepage.mac.com/lawrencedavid/cuteanimals/brazilian_tapir.jpg

http://farm2.static.flickr.com/1028/1483811987_a62459abd7.jpg

@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@scottburton11
scottburton11 / gist:3222152
Created August 1, 2012 00:58
Audio Compression for Voiceover

About compression

Audio compression is used to reduce the dynamic range of a recording. Dynamic range is the difference between the loudest and softest parts of an audio signal. It was originally used to guard against defects when cutting wax and vinyl phonograph records, but generally became useful as a way of increasing the loudness of an audio recording without achieving distortion.

The goal of most compression applications is to increase the amplitude of the softest parts of a recording, without increasing the amplitude of the loudest parts.

Compressor anatomy

Compressors generally all have the same conceptual parts. However, not all compressors present variable controls for all parts to the user. If you don't see all of your compressor's controls here, there's a chance it either has a fixed value (and no control), or is named something else:

@krzysztofzablocki
krzysztofzablocki / gist:4396302
Last active November 24, 2021 19:17
Set symbol breakpoint on objc_msgSend then setup this debug command to log all methods called in iOS Simulator. If you want to do device debugging change esp+4 register to r0, esp+8 to r1 Found long ago somewhere on stackoverflow.
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
@dougireton
dougireton / recruiter_response.md
Last active January 11, 2020 22:52
I've started responding to recruiters with this list of requirements

Company Requirements

I'm definitely not looking for work. However to provide some helpful guidance for hiring like-minded engineers, I would only consider working for a company if it met these requirements:

  1. Fewer than 250 employees.
  2. Concrete, measurable plan to increase the number of women and minorities in engineering roles.
  3. Commitment to using and contributing to open source.
  4. Collaborative, friendly atmosphere where pair programming is encouraged.
  5. Meaningful work with clear linkage between work and company goals.
  6. Demonstrated commitment to ethical business practices, e.g. B corp certification.
@neonichu
neonichu / bump_xcode_plugin.sh
Created March 12, 2015 16:28
Quickly bump the compatibility UUID of a plugin in the CWD to the one of the currently selected Xcode.
#!/bin/sh
PLIST_BUDDY=/usr/libexec/PlistBuddy
function add_id {
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $1" "$2"
}
function has_id {
read_id DVTPlugInCompatibilityUUIDs *Info.plist|grep -q "$1"
#!/usr/bin/env ruby
require 'pathname'
code_files = ARGV
code_files.each do |file|
file = Pathname(file)
contents = file.read
contents.gsub!(/(^#import .*\n)+/) do |imports|
imports = imports.split("\n")
imports.sort.uniq.join("\n") << "\n"
// Copyright 2004-present Facebook. All Rights Reserved.
'use strict';
var SourceMapConsumer = require('source-map').SourceMapConsumer;
var fs = require('fs');
var argv = process.argv.slice(2);
if (argv.length < 2) {
console.error('Usage: ' + __filename + ' <source-map-file> <lineNumber> [column]');
process.exit(1);

Rent The Runway - Docker D&D

Related blog post:

http://artsy.github.io/blog/2015/12/09/docker-for-development/

Reasons for using docker:

  • new developers have a setup that works without installing and configuring MongoDB, Solr, Elasticsearch, memcached, etc.
  • a docker-compose.yml file can provide the related services and environment variables an application needs.