- Open the "Packages" folder
- Save the theme under the folder PlainTasks/ with the name "tasks-monokai.hidden-tmTheme"
- Open the user settings for the package PlainTasks
- Update the "color-scheme" property (see the file attached below) to match the saved filename
// Files & Commands | |
cmd + p // quick file switcher | |
cmd + shift + p // command palette | |
cmd + r // quick function search | |
cmd + shift + r // rename file | |
// Selection | |
cmd + option + g // select all instances of word under cursor | |
// Find & Replace |
type git # get the type of any command. Great for | |
# seeing if a command exists. | |
ls -t # sort by time, newest first | |
ls -tr # sort by time, oldest first | |
grep -r "test" FILE_OR_DIR # recursive full text search | |
grep -i "test" FILE # case insensitive | |
grep -c "pattern" FILE # count | |
grep -n "pattern" # show line numbers |
# importing | |
import sha # import the the sha module | |
from animal import Animal # import the Animal class from animal.py | |
# unit testing | |
# http://docs.python.org/3/library/unittest.html | |
import unittest | |
class AnimalTest(unittest.TestCase): |
Copyright (c) 4-digit year, Company or Person's Name
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/*output*//* | |
var foo = 'd', bar = 'e'; | |
console.log('a', 'b', 'c', foo, bar); | |
console.log('a', 'b', 'c', foo, 2, 3, 4, 5); | |
console.log('a', 'c', 'b'); | |
console.log('a', 'd', 'b', 'f', 'e', 'g', foo); | |
function veryLongFunction() { | |
console.log.apply(console, arguments); | |
} | |
veryLongFunction('a', 'b', 'c', 'd', 'e', 'f'); |
Using WebSockets, React and Reflux together can be a beautiful thing, but the intial setup can be a bit of a pain. The below examples attempt to offer one (arguably enjoyable) way to use these tools together.
This trifect works well if you think of things like so:
- Reflux Store: The store fetches, updates and persists data. A store can be a list of items or a single item. Most of the times you reach for
this.state
in react should instead live within stores. Stores can listen to other stores as well as to events being fired. - Reflux Actions: Actions are triggered by components when the component wants to change the state of the store. A store listens to actions and can listen to more than one set of actions.
Logging thoughts and approaches on getting (parts of) the Haskell ethereum client running in the browser.
There are a number of different alternatives. In order of appearance, I estimate the following to languages to need the least amount of porting.
- GHCJS supports full GHC
- Haste is full Haskell but with different libraries
- Fay is a proper subset of Haskell
- Elm is a Haskell-like language
Shut down without showing a confirmation dialog: | |
osascript -e 'tell app "System Events" to shut down' | |
Shut down after showing a confirmation dialog: | |
osascript -e 'tell app "loginwindow" to «event aevtrsdn»' | |
Restart without showing a confirmation dialog: | |
osascript -e 'tell app "System Events" to restart' | |
Restart after showing a confirmation dialog: |
module TimeApp ( start, Config, App ) where | |
{-| This module helps you start your application in a typical Elm workflow. | |
It assumes you are following [the Elm Architecture][arch] and using | |
[elm-effects][]. From there it will wire everything up for you! | |
**Be sure to [read the Elm Architecture tutorial][arch] to learn how this all | |
works!** | |
[arch]: https://github.com/evancz/elm-architecture-tutorial | |
[elm-effects]: http://package.elm-lang.org/packages/evancz/elm-effects/latest |