Skip to content

Instantly share code, notes, and snippets.

View carlosmcevilly's full-sized avatar

Carlos McEvilly carlosmcevilly

View GitHub Profile
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
scutil --set ComputerName "MathBook Pro"
scutil --set HostName "MathBook Pro"
scutil --set LocalHostName "MathBook-Pro"
@carlosmcevilly
carlosmcevilly / gist:7258225
Last active December 27, 2015 03:19
app banner meta tag
<meta name="apple-itunes-app" content="app-id=1234567",app-argument="my-custom-url-scheme://my-custom-url/my-custom-path?myparam=myvalue">
no need to register my-custom-url-scheme in this case.
get app ID from http://itunes.apple.com/linkmaker/
@carlosmcevilly
carlosmcevilly / gist:7204516
Created October 28, 2013 20:55
enable key repeat on osx
defaults write -g ApplePressAndHoldEnabled -bool false
@carlosmcevilly
carlosmcevilly / gist:6513946
Created September 10, 2013 18:56
update the locate database on os x
sudo /usr/libexec/locate.updatedb
@carlosmcevilly
carlosmcevilly / gist:6066739
Created July 23, 2013 22:29
readme, a very non-generic convenience alias specifically for reading README.md files
# (add to .bashrc)
alias readme='markdown README.md | lynx -stdin'
@carlosmcevilly
carlosmcevilly / make-switch-images.pl
Last active December 19, 2015 13:09
Script to create images for customizing UISwitch using ImageMagick
#!/usr/bin/perl
use strict;
use warnings;
# change these to your custom text values
my $ontext = "ON";
my $offtext = "OFF";
my $bgcolor = "none";
package dropbox
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
@carlosmcevilly
carlosmcevilly / nuke-yadda.pl
Created May 1, 2013 20:29
remove yadda yadda from .m and .h files in current project
#!/usr/bin/perl
use strict;
use warnings;
my $path = $ENV{'XcodeProjectPath'};
$path =~ s{(.*)/\w+\.xcodeproj}{"$1"};
my $cmd = "/usr/bin/find $path -type f -name \"*.[mh]\" -print";
my $files = qx($cmd);
@carlosmcevilly
carlosmcevilly / gist:5490160
Last active July 12, 2024 06:13
proxy settings for various clients - some very old notes
# shell
A possibly related setting is the FTP_PASSIVE_MODE=yes in dotfiles.
Not to be confused with FTP_PASSIVE=on for Net::FTP configuration
# git
git config --global https.proxy https://user:password@address:port
# also can use NTLM Authorization Proxy Server (NTLMAPS) (zip file is in my email archive)
@carlosmcevilly
carlosmcevilly / gist:5486132
Last active December 16, 2015 19:38
serve files from current directory
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"