- install rsync on boot2docker VM
- install rsync locally
- install fswatch locally
- configure docker image to use a data volume, "/mnt/node_src" or whatever. this is a directory inside the VM. do not make this into a shared folder
- configure rsync to send your local node source directory to the VM into the "/mnt/node_src" directory (it does this via the network, not vbox shared folders)
- configure fswatch locally to trigger rsync when your source code changes
- configure
forever
to watch "/mnt/node_src" for changes in the VM - ?????
- profit!
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
$('#tools li').each(function() { | |
analytics.trackLink($(this), 'Social Link', { | |
platform: $(this).attr('title') | |
}); | |
}); |
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
<div id="footer"> | |
<span id="footer-img"><img src="/images/logo-sm.png" width="58" height="22" alt="ZingCharts" /></span> | |
<div class="nav"> | |
<?php | |
$menu = array("Home"=>"$prefix/", "Download"=>"http://www.zingchart.com/download/", "Purchase"=>"$securePrefix/store/buy.php", "Learn"=>"/reference/", "Support"=>"$prefix/support/", "About"=>"$prefix/about/", "Privacy"=>"$prefix/privacy/", "Terms"=>"$prefix/legal/tc.php", "Site Map"=>"$prefix/sitemap/", "White Papers"=>"$prefix/assets/pdf/zc-brochure.pdf"); | |
foreach ($menu as $key => $value){ | |
if ($current_location == $key){ | |
echo $key . " "; | |
} else if ($key == "White Papers") { | |
echo "<a href='$value' target='_blank' id='white_papers_link'>$key</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
// Segment.io tracking: which modules were selected? | |
var props = {}; | |
var $chkboxes = $('.module-option input[type=checkbox]'); | |
$chkboxes.each(function() { | |
props[$(this).attr('name')] = $(this).attr('checked'); | |
}); | |
analytics.trackForm(form, 'Build Created', props); |
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
<?php | |
include "mixpanel_data.php" | |
$mp = new Mixpanel($api_key, $api_secret); | |
$data = $mp->request(array('engage'), array( | |
'where' => 'properties["email"] == ""', | |
'page' => $page | |
)); |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"math/rand" | |
"strconv" | |
"sync" | |
) |
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
execve("/usr/bin/docker", ["docker", "-d", "-D"], [/* 14 vars */]) = 0 | |
uname({sys="Linux", node="ip-10-5-152-136", ...}) = 0 | |
brk(0) = 0x229d000 | |
brk(0x229e1c0) = 0x229e1c0 | |
arch_prctl(ARCH_SET_FS, 0x229d880) = 0 | |
set_tid_address(0x229db50) = 7479 | |
set_robust_list(0x229db60, 24) = 0 | |
futex(0x7fff70c269c0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 229d880) = -1 EAGAIN (Resource temporarily unavailable) | |
rt_sigaction(SIGRTMIN, {0x7da500, [], SA_RESTORER|SA_SIGINFO, 0x7dabc0}, NULL, 8) = 0 | |
rt_sigaction(SIGRT_1, {0x7da590, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7dabc0}, NULL, 8) = 0 |
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
[39355.705832] Memory cgroup out of memory: Kill process 8378 (php) score 999 or sacrifice child | |
[39355.712940] Killed process 8378 (php) total-vm:657284kB, anon-rss:408400kB, file-rss:0kB | |
[65425.582891] Memory cgroup out of memory: Kill process 8616 (ruby) score 809 or sacrifice child | |
[65425.589482] Killed process 8612 (wkhtmltoimage) total-vm:346084kB, anon-rss:56492kB, file-rss:0kB | |
[65427.755910] Memory cgroup out of memory: Kill process 8712 (ruby) score 810 or sacrifice child | |
[65427.760548] Killed process 8708 (wkhtmltoimage) total-vm:346212kB, anon-rss:56584kB, file-rss:0kB | |
[65431.124425] Memory cgroup out of memory: Kill process 8764 (ruby) score 810 or sacrifice child | |
[65431.129199] Killed process 8759 (wkhtmltoimage) total-vm:345964kB, anon-rss:56564kB, file-rss:0kB | |
[65435.164030] Memory cgroup out of memory: Kill process 8780 (ruby) score 810 or sacrifice child | |
[65435.168430] Killed process 8776 (wkhtmltoimage) total-vm:345944kB, anon-rss:56428kB, file-rss:0kB |
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 | |
touch kill.me | |
for i in {0..10000} | |
do | |
container_name=$RANDOM-$i | |
echo $container_name | |
if [ ! -f kill.me ]; then | |
echo "Exiting..." | |
exit 0 | |
fi |
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
macro_rules! go( | |
($inp:expr $sp:path) => ( | |
unsafe{ spawn( $inp ) } | |
); | |
) |