Restart USB ports after a power overdraw (error -110). Unplug all devices prior to running script.
References:
Restart USB ports after a power overdraw (error -110). Unplug all devices prior to running script.
References:
| import * as IOEffects from 'redux-saga/effects' | |
| export function * select (...args) { | |
| return yield IOEffects.select(...args) | |
| } | |
| export function * put (...args) { | |
| return yield IOEffects.put(...args) | |
| } |
| describe("DataView", function() { | |
| it("should implement Uint24 accessors", function() { | |
| var i, n, buf, dv; | |
| buf = new ArrayBuffer(3); | |
| dv = new DataView(buf); | |
| n = Math.pow(2, 24); | |
| // this should give us decent coverage without trying every single number, which takes forever | |
| for(i = 1; i < n; i += 111) { | |
| dv.setUint24(0, i); | |
| dv.getUint24(0).should.equal(i); |
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
| { "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context": | |
| [ | |
| { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, | |
| { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true } | |
| ] | |
| } |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
| var tests = Object.keys(window.__karma__.files).filter(function (file) { | |
| return /\.spec\.js$/.test(file); | |
| }).map(function(file){ | |
| return file.replace(/^\/base\/src\/js\/|\.js$/g,''); | |
| }); | |
| require.config({ | |
| baseUrl: '/base/src/js', | |
| paths: { | |
| "lib":"../../target/js/lib" |
| /* Side notes for calling out things | |
| -------------------------------------------------- */ | |
| /* Base styles (regardless of theme) */ | |
| .bs-callout { | |
| margin: 20px 0; | |
| padding: 15px 30px 15px 15px; | |
| border-left: 5px solid #eee; |