Skip to content

Instantly share code, notes, and snippets.

$ docker-machine create --driver virtualbox default
Running pre-create checks...
(default) Default Boot2Docker ISO is out-of-date, downloading the latest release...
(default) Latest release for github.com/boot2docker/boot2docker is v1.12.0-rc4
(default) Downloading /Users/irfan/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v1.12.0-rc4/boot2docker.iso...
(default) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(default) Copying /Users/irfan/.docker/machine/cache/boot2docker.iso to /Users/irfan/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
@irfan
irfan / mixpanel.error.tracking.js
Created March 14, 2016 22:27
Mixpanel js error tracking
<script>
window.onerror = function(message, file, line) {
var prop = {}
prop.message = message;
prop.file = file;
prop.line = line;
mpq.track('js-err',prop);
}
</script>
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/lwip_decoder.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
<?php
class SubsequentCalc
{
/*
* The first numbers of the subsequent series
*/
private $fNums = array();
<?php
/**
* user nick update
*/
namespace \User\Credential;
class User extends BaseUser
{
$.ajax({
data: {
"userId":"3",
"passwd":"123456",
"passwdVerify":"123456",
"email": "[email protected]"
},
url: "/api/agent/3",
type: "PUT"
});
******************************************************
* To setup named to run, you need to copy named.conf.dist
* to named.conf:
* sudo cp /opt/local/etc/named.conf.dist /opt/local/etc/named.conf
* and edit as needed. If you use the default zone files for
* 127.0.0, localhost, and the cache, you also need to copy
* those files:
* sudo cp /opt/local/var/named/db.127.0.0.dist /opt/local/var/named/db.127.0.0
* sudo cp /opt/local/var/named/db.cache.dist /opt/local/var/named/db.cache
@irfan
irfan / index.php
Last active December 28, 2015 23:09
<?php
// request url : localhost.local/index.php/foo/bar/
// output url : localhost.local/foo/bar/
$path = $_SERVER['REQUEST_URI'];
$server = $_SERVER['SERVER_NAME'];
if ($path !== '/') {
$path = explode('/', $path);
###########################################################
# A startup item has been generated that will aid in
# starting bind9 with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo port load bind9
###########################################################
---> Installing bind9 @9.9.4-P1_0
---> Activating bind9 @9.9.4-P1_0
~ $ sudo port install tmux
---> Computing dependencies for tmux
---> Dependencies to be installed: libevent openssl zlib xz gettext expat libiconv gperf ncurses
---> Fetching archive for expat
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports.