https://github.geo.apple.com/jaybuff/swift-build-centos https://github.geo.apple.com/ebrown3/swift-rpm
Before writing any in-house code, it is wise to check if there already exists a published library for the task at hand. If you're interacting with a service, chances are the developers of the service had taken time to develop official libraries for the more popular programming languages. If it's a task that you suspect is a solved problem, chances are someone has taken the initiative to open source their solution.
Here are the resources to discover libraries and tools for your programming task.
- Search on PyPi – the Python Package Index
- GitHub Code Search
- BitBucket Explorer
- Command Line
pip search
+grep
, e.g.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>EthernetBuiltIn</key> | |
<string>Yes</string> | |
<key>GenerateCStates</key> | |
<string>Yes</string> | |
<key>GeneratePStates</key> | |
<string>Yes</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# checkout git-review from GitHub and install | |
# note: this is not the same git-review available via pip installer | |
git clone git@github.com:facebook/git-review.git | |
cd git-review/ | |
sudo python setup.py install | |
# assuming you have Homebrew installed | |
brew install tkdiff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run with sudo user privileges | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo chmod 644 /etc/apt/sources.list.d/google-chrome.list | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-to-list 'load-path "~/.emacs-lisp") | |
;; Auto-Complete | |
(require 'anything) | |
;; Python nice-to-haves | |
(require 'lambda-mode) | |
(add-hook 'python-mode-hook #'lambda-mode 1) | |
(setq lambda-symbol (string (make-char 'greek-iso8859-7 107))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foobar(a, b, c, (username, password)=(None,None)): | |
print a, b, c, username, password | |
foobar(1, 2, 3, ('hello','world')) # 1 2 3 hello world | |
foobar(1, 2, 3) # prints "1 2 3 None None" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (c) 2012 Anthony Wu, twitter.com/anthonywu | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Anthony Wu | |
# A quick way to make Python enum classes. | |
# Uses range/enumerate to quickly generate a list of enumerated values, | |
# but only safe/useful for your application logic where you don't have | |
# to persist these values to a data store. | |
# Example A: hard code enum classes | |
class Fruits(object): |
I hereby claim:
- I am anthonywu on github.
- I am anthonywu (https://keybase.io/anthonywu) on keybase.
- I have a public key whose fingerprint is B705 0771 3519 68DA AACE 104C AB83 AD17 6691 0D05
To claim this, I am signing this object: