⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 get_stopwords(file='stopwords.txt'): | |
""" given a file, default stopwords.txt, returns a list containing all of the words | |
in the file """ | |
stopwords = [] | |
words = open(file,'r') | |
for word in words: | |
stopwords.append(word.strip()) | |
return stopwords |
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
<?php | |
/* | |
Template Name: Comment Graph | |
*/ | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
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
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
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
//safeTransliterate v3, copyright (cc-by 3.0) Kroc Camen <camendesign.com> | |
//generate a safe (a-z0-9_) string, for use as filenames or URLs, from an arbitrary string | |
function safeTransliterate ($text) { | |
//if available, this function uses PHP5.4's transliterate, which is capable of converting arabic, hebrew, greek, | |
//chinese, japanese and more into ASCII! however, we use our manual (and crude) fallback *first* instead because | |
//we will take the liberty of transliterating some things into more readable ASCII-friendly forms, | |
//e.g. "100℃" > "100degc" instead of "100oc" | |
/* manual transliteration list: | |
-------------------------------------------------------------------------------------------------------------- */ |
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
@include handhelds { | |
table.responsive { | |
width: 100%; | |
thead { | |
display: none; | |
} | |
tr { | |
display: block; | |
} | |
td, th { |
( Conversation started here, with @murtaugh and @zeldman. )
Ah man, I got Opinions™ on this. I ususally go with something like:
<aside>
<h1>Optional Heading</h1>
<blockquote>
<p>It is the unofficial force—the Baker Street irregulars.</p>
</blockquote>
Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?
- Work with great people.
- Deploy like crazy. This means the team has to control the infrastructure as well as code.
- Design is not a service. Designers have to sit in the team.
- Infrastructure is intrinsically unreliable. Discard and replace is the robust strategy.
- Use your CDN for HTML too.
- Don't always do as you are told.
OlderNewer