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
git push -u origin (branch.name) # make new remote branch with current local repo | |
git checkout --track -b (localbranch.name) (remote)/(remotebranch.name) # checkout and track remote branch | |
git push (remote) :(remotebranch.name) # delete remote branch | |
.gitconfig: push.default=upstream # config "git push" to push only current branch | |
# Generate detailed ASM listing | |
g++ -S -fverbose-asm (source).cpp; as -alhnd (source).s > (verbose.listing).s | |
# oprofile incantation. It seems that bug in old version requires shutdown to get rid of some silly warning about missed samples. |
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
{ | |
"cmd": | |
[ | |
"make", "-j", "30", "-k", | |
"foo", "# This is a SublimeText2 file in my User directory to parse GCC errors." | |
], | |
"selector": "source.c++", | |
"working_dir": "/home/josh.chia/git/build/target", | |
"file_regex": "^([^:]*):([0-9]+):[0-9]+: (?:error|note):" | |
} |
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/python | |
# Transpose the deltas so that the first one is 0 and everything is in [0, 12). | |
def normalize(deltas): | |
root = deltas[0] % 12 | |
return [(delta + 12 - root) % 12 for delta in deltas] | |
def transpose(deltas, base): | |
return [(delta + base) % 12 for delta in deltas] |
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
#!/bin/bash | |
# | |
# $Id: bld.sh,v 1.2 2012/09/22 16:04:19 jlinoff Exp jlinoff $ | |
# | |
# Author: Joe Linoff | |
# | |
# This script downloads, builds and installs the gcc-4.7.2 compiler | |
# and boost 1.51. It takes handles the dependent packages like | |
# gmp-5.0.5, mpfr-3.1.1, ppl-1.0 and cloog-0.17.0. | |
# |
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
name: ca | |
version: 0.1.0.0 | |
synopsis: Initial project template from stack | |
description: Please see README.md | |
license: BSD3 | |
license-file: LICENSE | |
author: Josh Chia | |
maintainer: [email protected] | |
copyright: Copyright (c) 2016 Joshua Chia | |
category: Development |
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 stack | |
-- stack --resolver nightly-2017-10-08 runghc --package graphviz | |
import qualified Data.GraphViz.Types.Graph as GV | |
import Data.GraphViz.Commands (GraphvizOutput(..), dirCommand, runGraphvizCommand) | |
main :: IO () | |
main = do | |
-- This generates an arc with the wrong direction. There should be an arc from 0 to 1 but this code produces | |
-- an arc from 1 to 0, contrary to the documentation of the fields of DotEdge, popular convention and fgl | |
-- convention. |
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
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0 | |
2018-01-08 22:54:31.020091: [debug] Checking for project config at: /home/jchia/hs/doc/stack.yaml | |
@(Stack/Config.hs:842:9) | |
2018-01-08 22:54:31.020271: [debug] Loading project config file stack.yaml |
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
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0 | |
2018-01-08 22:54:41.320427: [debug] Checking for project config at: /home/jchia/hs/doc/stack.yaml | |
@(Stack/Config.hs:842:9) | |
2018-01-08 22:54:41.320552: [debug] Loading project config file stack.yaml |
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
{-# LANGUAGE DataKinds, FlexibleInstances, TemplateHaskell, TypeFamilies, TypeOperators #-} | |
module Lib3 (partQ) where | |
import ClassyPrelude hiding (IsMap, Map) | |
import Data.Proxy | |
import GHC.TypeLits | |
import Language.Haskell.TH | |
import Labels |
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
{-# LANGUAGE DataKinds, FlexibleInstances, TemplateHaskell, TypeFamilies, TypeOperators #-} | |
module LabelsTH where | |
import ClassyPrelude | |
import Language.Haskell.TH | |
import Labels ((:=)) | |
typeForFieldname :: String -> Type | |
typeForFieldname "x" = ConT ''Int |
OlderNewer