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 u.id, u.slug, pp.points, pp.id AS pp_id | |
| FROM users u | |
| JOIN performance_points pp ON pp.user_id = u.id | |
| JOIN team_memberships tm ON tm.team_id = pp.team_id AND tm.user_id = pp.user_id | |
| WHERE (pp.date > '2015-08-02 13:57:14.042221') | |
| LIMIT 50 |
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
| def name | |
| "#{firstname} #{lastname}" | |
| end |
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
| function! s:path_to_current_file() | |
| return expand("%") | |
| endfunction | |
| function! s:splitv(file_name) | |
| execute "vsplit " . a:file_name | |
| endfunction | |
| function! s:splith(file_name) | |
| execute "split " . a:file_name |
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
| testing... |
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/sh | |
| # Prevent you from pushing commits that have "WIP" in the message | |
| branch=`git branch 2>/dev/null | grep '^*' | colrm 1 2` | |
| git log $branch ^origin/$branch --pretty="format:%h %s" | grep "WIP" | |
| if [[ $? -eq 0 ]]; then | |
| echo "Found commits with WIP messages" | |
| exit 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
| module MoreState where | |
| import Control.Monad.Except | |
| import Control.Monad.State.Class | |
| import Control.Monad.Trans.State hiding (get, put) | |
| import Data.List | |
| import Data.Map (Map) | |
| import qualified Data.Map as M |
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
| (load-file "~/.emacs.d/sensible-defaults.el") | |
| (sensible-defaults/use-all-settings) | |
| ;;; Load emacs builtin package manager | |
| ;;; Load packages both from marmalade and melpa | |
| (require 'package) | |
| (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) | |
| (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) | |
| (setq package-enable-at-startup nil) |
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
| module StateIOYo where | |
| import Control.Monad.Trans.State | |
| import Control.Concurrent | |
| import Control.Monad.IO.Class | |
| main :: IO () | |
| main = do | |
| (_, fs) <- runStateT sampleAction [] | |
| evalAll putStrLn fs |
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
| sides = [ | |
| "left", | |
| "right", | |
| ] | |
| colors = [ | |
| "on red", | |
| "on blue", | |
| "on yellow", | |
| "on green", |
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
| module Optional where | |
| data Optional a = Some a | |
| | None | |
| instance Functor Optional where | |
| fmap f (Some x) = Some (f x) | |
| fmap _ None = None | |
| instance Applicative Optional where |