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
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done |
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
#!/usr/bin/env bash | |
# You will need to update app names, paths to apps, and the location of the | |
# custom app icons. Also, each app includes a `has_copied` var, and each one | |
# should be 1 higher than the previous. Lastly, the conditional on line 32 | |
# should be updated to match the value of the last `has_copied`. That will | |
# trigger a restart of the Dock to ensure the new icons are picked up. | |
# | |
# There is likely a MUCH smarter way to pull this off. I welcome | |
# recommendations and optimizations! |
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
/* CSS */ | |
.Chapters { | |
column-count: 2; | |
counter-reset: toc -1; | |
} | |
.Chapter { | |
counter-increment: toc; | |
list-style-type: 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
// To use with your component as a decorator: | |
import React from 'react'; | |
import styles from './styles.css'; | |
import Internalize from 'components/InternalLinks'; | |
@Internalize | |
export default class BlogContent extends React.Component { | |
static propTypes = { | |
content: PropTypes.static.isRequired |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 React, { Component } from 'react'; | |
import update from 'react-addons-update'; | |
export default class App extends Component { | |
state = { | |
touches: { | |
touchstart: { | |
x: -1, | |
y: -1 |
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 React, {Component, PropTypes} from 'react'; | |
import Hammer from 'react-hammerjs'; | |
import classNames from 'classnames'; | |
export default class ScrollPanel extends Component { | |
static propTypes = { | |
items: PropTypes.array, | |
menuStyle: PropTypes.string, | |
selectedItem: PropTypes.number, |
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
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
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
Show hidden characters
// Convert 2 spaces to tabs in Sublime Text | |
// To add a key binding, go to "Sublime Text » Preferences » Key Bindings - User" and add the following line: | |
// { "keys": ["super+;"], "command": "run_macro_file", "args": {"file": "Packages/User/convert_spaces_to_tabs.sublime-macro"} } | |
// Change the `super+;` shortcut accordingly. | |
[ | |
{ | |
"args": { | |
"setting": "tab_size", | |
"value": 2 |
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
javascript: | |
__cnt__=0; | |
__buttons__=jQuery(".content-main .user-actions-follow-button"); | |
__length__=__buttons__.length; | |
__interval__=setInterval(function () { | |
el=jQuery(__buttons__[__cnt__]); | |
if (__cnt__ === __length__) { | |
alert("All done!"); | |
clearInterval(__interval__); | |
} |
NewerOlder