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
import Security | |
public class Keychain { | |
public class func save(str: String?, forKey: String) -> Bool { | |
if str == nil { | |
return false | |
} | |
let dataFromString: NSData = str!.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! | |
let query = [ |
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
box: nafu/ubuntu12.04-ruby2.1.1@1.0.1 | |
# Build definition | |
# See the Rails section on the wercker devcenter: | |
# http://devcenter.wercker.com/articles/languages/ruby/settingup-rails4.html | |
# You will want to define your database as follows: | |
services: | |
- wercker/postgresql | |
# See more about services on our devcenter: | |
# http://devcenter.wercker.com/articles/services/ | |
build: |
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
# 6.00x Problem Set 4A Template | |
# | |
# The 6.00 Word Game | |
# Created by: Kevin Luu <luuk> and Jenna Wiens <jwiens> | |
# Modified by: Sarina Canelake <sarina> | |
# | |
# | |
# Implemented by: Fumiya Nakamura <nafu> | |
# |
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
deployment: | |
production: | |
branch: master | |
commands: | |
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku features:disable preboot --app production; else heroku features:enable preboot --app production; fi | |
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku maintenance:on --app production; fi | |
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku scale worker=0 --app production; fi | |
- git push -f git@heroku.com:production.git $CIRCLE_SHA1:refs/heads/master | |
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku run 'rake db:migrate' --app production; fi | |
- heroku run 'rake db:seed' --app production |
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
WORD='XXX:'; FILE=`ack $WORD -l | head -1`; cat $FILE; sed '/'$WORD'/d' $FILE > tmp; mv tmp $FILE; |
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
# 6.00x Problem Set 5 | |
# | |
# Part 2 - RECURSION | |
# | |
# Problem 3: Recursive String Reversal | |
# | |
def reverseString(aStr): | |
""" | |
Given a string, recursively returns a reversed copy of the 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
# 6.00x Problem Set 5 | |
# | |
# Part 1 - HAIL CAESAR! | |
import string | |
import random | |
WORDLIST_FILENAME = "words.txt" | |
# ----------------------------------- |
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
# 6.00 Problem Set 3 | |
# | |
# Hangman game | |
# | |
# ----------------------------------- | |
# Helper code | |
# You don't need to understand this helper code, | |
# but you will have to know how to use the functions | |
# (so be sure to read the docstrings!) |
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
<!DOCTYPE HTML> | |
<html lang="ja-JP"> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<title>D3Circle</title> | |
</head> | |
<body> | |
<div id="D3line"></div> | |
<script type="text/javascript"> |
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
<!DOCTYPE HTML> | |
<html lang="ja-JP"> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<title>D3line</title> | |
</head> | |
<body> | |
<div id="D3line"></div> | |
<script type="text/javascript"> |
NewerOlder