Skip to content

Instantly share code, notes, and snippets.

View DavidGoussev's full-sized avatar

David Goussev DavidGoussev

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
define(["require", "exports"], function (require, exports) {
/**
* Helper to use the Command Line Interface (CLI) easily with both Windows and Unix environments.
* Requires underscore or lodash as global through "_".
*/
var Cli = (function () {
function Cli() {
}
/**
* Execute a CLI command.

#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;
@DavidGoussev
DavidGoussev / Firebase + AngularJS Presence
Created March 8, 2016 05:48 — forked from simpulton/Firebase + AngularJS Presence
A real-time presence service using Firebase and AngularJS.
app.controller('MainCtrl', ['$scope', 'PresenceService', function ($scope, PresenceService) {
$scope.totalViewers = 0;
$scope.$on('onOnlineUser', function(){
$scope.$apply(function () {
$scope.totalViewers = PresenceService.getOnlineUserCount();
});
});
}]);
@DavidGoussev
DavidGoussev / gist:7916cb55ae331758ecd5
Created January 25, 2016 03:20 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<p id="text"></p>
<script>
@DavidGoussev
DavidGoussev / GIF-Screencast-OSX.md
Created November 16, 2015 22:06 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: