This file contains hidden or 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 Control.Concurrent | |
| import Control.Exception | |
| setInterval :: Int -> a -> (a -> IO a) -> IO () | |
| setInterval microsecs a action = do | |
| mvar <- newEmptyMVar | |
| _ <- setInterval' microsecs a mvar action | |
| takeMVar mvar |
This file contains hidden or 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 Html exposing (div, button, text, Attribute) | |
| import Html.Events exposing (onClick) | |
| import Html.Attributes exposing (style) | |
| import StartApp.Simple as StartApp | |
| {-| Read more about StartApp and how this works at: | |
| https://github.com/evancz/start-app | |
| The rough idea is that we just specify a model, a way to view it, |
This file contains hidden or 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
| {Observable, AsyncSubject} = require \Rx | |
| request = require \request | |
| {sum} = require \prelude-ls | |
| log-source = (source) -> | |
| source.subscribe do | |
| (x) -> | |
| console.log \x, x | |
| (err) -> | |
| console.log \err, err |
This file contains hidden or 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
| select TagId, Count (*) as Count from PostTags | |
| where PostId > 31938184 | |
| group by TagId | |
| select top 1 * from Posts | |
| where CreationDate > '2015-01-02' | |
| order by Id | |
| select top 1 * from Posts |
This file contains hidden or 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
| lsof -n -i4TCP:4081 | tail -n1 | cut -d' ' -f5 | xargs kill |
This file contains hidden or 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
| Rx.Observable.prototype.bufferWithTimeHasty = function(interval, refresh){ | |
| var source; | |
| source = this; | |
| return Rx.Observable.create(function(observer){ | |
| var bundle, refereshInterval; | |
| bundle = []; | |
| refereshInterval = setInterval(function(){ | |
| var now, expiration, j, i; | |
| now = Date.now(); | |
| expiration = now - interval; |
This file contains hidden or 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
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:nginx/stable | |
| sudo apt-get update | |
| sudo apt-get install nginx-full | |
| nginx -V 2>&1 | grep -o with-http_stub_status_module |
This file contains hidden or 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
| #!/bin/zsh | |
| # brew install aspell | |
| # nano .git/hooks/commit-msg | |
| # chmod +x .git/hooks/commit-msg | |
| ASPELL=$(which aspell) | |
| if [ $? -ne 0 ]; then | |
| echo "Aspell not installed - unable to check spelling" >&2 | |
| exit | |
| else | |
| WORDS=$($ASPELL list < "$1") |
This file contains hidden or 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" = ("insertText:", "α"); | |
| "~b" = ("insertText:", "β"); | |
| "~g" = ("insertText:", "γ"); | |
| "~i" = ("insertText:", "ι"); | |
| "~k" = ("insertText:", "κ"); | |
| "~@k" = ("insertText:", "κ"); | |
| "~^d" = ("insertText:", "∂"); | |
| "~d" = ("insertText:", "δ"); | |
| "~$D" = ("insertText:", "Δ"); |
This file contains hidden or 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 SetInterval | |
| import SetIntervalT | |
| import Control.Concurrent | |
| import Control.Exception | |
| import Control.Monad.State | |
| sprint :: (Show b) => MVar () -> b -> IO () | |
| sprint mvar b = do | |
| putMVar mvar () | |
| print b |