Skip to content

Instantly share code, notes, and snippets.

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@DomiR
DomiR / vimcheat.md
Last active August 29, 2015 13:56
Vim Cheat Sheet

Code folding

Some common key bindings:

za - toggles

zc - closes

zo - opens

@DomiR
DomiR / Angular Object Filter.js
Created May 14, 2014 07:26
Order by object field.
yourApp.filter('orderObjectBy', function() {
return function(items, field, reverse) {
var filtered = [];
angular.forEach(items, function(item) {
filtered.push(item);
});
filtered.sort(function (a, b) {
return (a[field] > b[field] ? 1 : -1);
});
if(reverse) filtered.reverse();
@DomiR
DomiR / Beep.online.sh
Created June 1, 2014 20:53
Beep when online again.
beepwhenup () {
echo 'Enter host you want to ping:'; read PHOST;
if [[ "$PHOST" == "" ]];
then exit; fi;
while true;
do ping -c1 -W2 $PHOST 2>&1 >/dev/null;
if [[ "$?" == "0" ]];
then for j in $(seq 1 4);
do beep;
Function::define = (prop, desc) ->
Object.defineProperty this.prototype, prop, desc
class GetterSetterTest
constructor: (@_obj = {}) ->
# 'obj' is defined via the prototype, the definition proxied through
# to 'Object.defineProperty' via a function called 'define' providing
# some nice syntactic sugar. Remember, the value of '@' is
# GetterSetterTest itself when used in the body of it's class definition.
//
// This sketch will print some of interesting predefined constants to Serial.
//
// For more information, look at
// http://electronics4dogs.blogspot.com/2011/01/arduino-predefined-constants.html
// helper macro
#define LINE(name,val) Serial.print(name); Serial.print("\t"); Serial.println(val);
void setup()
var ITTrackKindFile = 1;
var iTunesApp = WScript.CreateObject("iTunes.Application");
var deletedTracks = 0;
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = mainLibrary.Tracks;
var numTracks = tracks.Count;
var i;
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>semantic-slider</title>
<style>
.ui.slider.range input[type="range"] {
-webkit-appearance: none;
border-width: 1px;

Add git to existing Xcode 4 project

It's easier than you might think, so let's take a closer look at it. We will use the Mac Terminal app to accomplish our goal.

cd #path to projectfolder         // Change directory to projectfolder
git init                          // Init the git repository in  
git add .                         // Add this folder to the created git repo
git commit -m "Initial commit" // Commit the files with arbitary message