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/bash | |
set -ex | |
PREFIX=$HOME/usr/tools/llvm | |
LLVM_VERSION=7.0.0 | |
BASE_URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION} | |
COMPOMENT=(llvm cfe compiler-rt libcxx libcxxabi openmp clang-tools-extra polly libunwind) |
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
#include "gcc-plugin.h" | |
#include "plugin-version.h" | |
#include "tree.h" | |
#include "cgraph.h" | |
#include <string> | |
#include <vector> | |
#include <map> |
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
source ~/.zplug/init.zsh | |
zplug "zplug/zplug" | |
#zplug "zsh-users/zsh-history-substring-search" | |
#zplug "zsh-users/zsh-completions" | |
#zplug "zsh-users/zsh-syntax-highlighting" | |
# Prezto | |
zplug "modules/prompt", from:prezto | |
zstyle ':prezto:module:prompt' theme 'yen3' |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
{-# LANGUAGE BangPatterns #-} | |
-- Compile command: ghc -O2 Mandelbrot.hs -rtsopts -threaded -fllvm | |
import qualified Control.Monad.Par as Par | |
import Control.Parallel.Strategies (parList, rseq, using) | |
import Data.Binary.IEEE754 (putFloat64le) | |
import Data.Binary.Put | |
import qualified Data.ByteString.Lazy as BL | |
import Data.Time.Clock (diffUTCTime, getCurrentTime) |
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 ListFiles where | |
import System.Directory | |
import System.FilePath.Posix | |
split:: [a] -> [Bool] -> ([a], [a]) | |
split xs bs = foldr s ([], []) (zip xs bs) | |
where s (d, i) (y, z) = if i then (d:y, z) else (y, d:z) | |
isSpecialFile :: FilePath -> Bool |
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
from __future__ import print_function | |
class Attribute(object): | |
def __init__(self): | |
pass | |
def main(): | |
a = Attribute(); | |
print(a.__dict__) | |
a.__setattr__("test", 5) |
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
class Singleton{ | |
public: | |
static const Singleton& getInstance(){ | |
static Singleton single; | |
return single; | |
}; | |
private: | |
Singleton():a(0){}; | |
unsigned int a; | |
}; |
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 Data.List | |
import System.Cmd | |
type ExecuteCmd = String | |
type Option = String | |
type OptionList = [Option] | |
data Command = Cmd ExecuteCmd OptionList | |
deriving (Show, Eq) |