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
| # Instrument binaries, pgo data to /data/pgo, serial make is important to not confuse the pgo generator | |
| env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-generate=/data/pgo' cmake .. -DCMAKE_BUILD_TYPE=Release | |
| make -j 1 | |
| # Run instrumented program, generate and write pgo data | |
| ./runIt | |
| # Use profile data and feed into gcc, correct for threading counter noise, serial make is important to not confuse the pgo generator | |
| env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-use=/data/pgo -fprofile-correction' cmake .. -DCMAKE_BUILD_TYPE=Release | |
| make -j 1 |
rundown of different scripts and what is what and what goes where.
- the
prevoutScriptis the script of the output being spend - the
redeemScriptis the script that is used to solve the P2SH - the
signatureScriptis the script that is taken into thesignatureHashfor signing - the
witnessRedeemScriptis the script that is used to solve the P2WSH - the
scriptSigis what goes into theinput.scriptSigwhen serializing the TX - the
witnessScriptis what goes into theinput.witnesswhen serializing the TX
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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 MaybeMonad = struct | |
| type 'a t = None | Maybe of 'a | |
| let return (a: 'a) : 'a t = Maybe a | |
| let (>>=) (m: 'a t) (f: 'a -> 'b t) : 'b t = match m with | |
| | None -> None | |
| | Maybe a -> f a | |
| let get (m: 'a t) (a: 'a) = match m with |
NOTE
You may not need local branches for all pull requests in a repo.
To fetch only the ref of a single pull request that you need, use this:
git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
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 React, {PropTypes} from 'react'; | |
| import classNames from 'classnames'; | |
| class BatchDropZone extends React.Component { | |
| static propTypes = { | |
| // function that recieves an array of files | |
| receiveFiles: PropTypes.func.isRequired, |
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 (..) | |
| import Html.Events exposing (..) | |
| main : Program Never Model Msg | |
| main = | |
| Html.program | |
| { init = init | |
| , view = view | |
| , update = update | |
| , subscriptions = \_ -> Sub.none |
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 selenium import webdriver | |
| from selenium.webdriver.remote.webelement import WebElement | |
| import os.path | |
| # JavaScript: HTML5 File drop | |
| # source : https://gist.github.com/florentbr/0eff8b785e85e93ecc3ce500169bd676 | |
| # param1 WebElement : Drop area element | |
| # param2 Double : Optional - Drop offset x relative to the top/left corner of the drop area. Center if 0. | |
| # param3 Double : Optional - Drop offset y relative to the top/left corner of the drop area. Center if 0. | |
| # return WebElement : File input |