To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
TARGET="$PROJECT_DIR/project/Info.plist" | |
echo $TARGET | |
if [ ! -f "$TARGET" ]; then | |
echo "missing file $TARGET" | |
exit 1; | |
fi | |
# the perl regex splits out the last part of a build number (ie: 1.1.1) and increments it by one | |
# if you have a build number that is more than 3 components, add a '\.\d+' into the first part of the regex. |
/*! | |
An experiment in getting accurate visible viewport dimensions across devices | |
(c) 2012 Scott Jehl. | |
MIT/GPLv2 Licence | |
*/ | |
function viewportSize(){ | |
var test = document.createElement( "div" ); | |
test.style.cssText = "position: fixed;top: 0;left: 0;bottom: 0;right: 0;"; |
/* ----------------------------------------------- | |
* Accurate Cross-Browser Viewport Width | |
* https://gist.github.com/2399828 | |
* ----------------------------------------------- | |
* Copyright 2012, Brett Jankord. | |
* http://www.brettjankord.com/ | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/MIT | |
* ------------------------------------------------*/ |
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
#import <Cocoa/Cocoa.h> | |
// clang -Weverything -fobjc-arc -framework Cocoa -o notification notification.m | |
void QuietLog (NSString *format, ...); | |
void StartSpying (void); | |
void StopSpying (void); | |
void QuietLog (NSString *format, ...) { |
#Node - Processes
To launch an external shell command or executable file you can use the child_process
. Apart from command line arguments and environment variables you cannot communicate with the process using child_process.exec
. However you can use child_process.spawn
to create a more integrated processes.
##Executing Child Processes
###To launch an external shell command
var child_process = require('child_process');
var exec = child_process.exec;
Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.
loosely based on https://gist.github.com/bnerd/2011232
// loosely based on https://gist.github.com/bnerd/2011232
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory
//----------------------------------------------- | |
// SPARK CORE CUSTOM PWM FREQUENCY EXAMPLE | |
//=============================================== | |
// Define your own frequency below! | |
// PWM Glitch issue fixed, only sets up PWM once, | |
// ... thereafter sets duty cycle. | |
// This allows true 0 - 100% PWM. | |
// Copy this into a new application at: | |
// https://www.spark.io/build and go nuts! | |
//----------------------------------------------- |
#ifndef Binary_h | |
#define Binary_h | |
#define B0 0 | |
#define B00 0 | |
#define B000 0 | |
#define B0000 0 | |
#define B00000 0 | |
#define B000000 0 | |
#define B0000000 0 |
I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.
TL;DR: Here's the solution I ended up with: https://github.com/filamentgroup/loadCSS/
For async JavaScript file requests, we have the async
attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: https://gist.github.com/igrigorik/2935269#file-notes-md ).
Seems there are a couple ways to load and apply a CSS file in a non-blocking manner: