Skip to content

Instantly share code, notes, and snippets.

View rbsgn's full-sized avatar

Roman Busygin rbsgn

  • Dodo Engineering
  • Moscow
  • X @rbsgn
View GitHub Profile

Patch flushDNSCache function located in /Applications/Tunnelblick.app/Contents/Resources/client.up.tunnelblick.sh with following code inside case statement:

10.10 )
  if [ -x /usr/sbin/discoveryutil ] ; then
    /usr/sbin/discoveryutil mdnsflushcache
    logMessage "Flushed the DNS Cache"
  else
    logMessage "/usr/sbin/discoveryutil not present. Not flushing the DNS cache"
 fi
@rbsgn
rbsgn / .bashrc
Last active August 29, 2015 14:07
Terminal setup
readonly GIT_CORE='/Applications/Xcode.app/Contents/Developer/usr/share/git-core'
readonly GIT_BASH_COMPLETION="$GIT_CORE/git-completion.bash"
readonly GIT_PS1="$GIT_CORE/git-prompt.sh"
[ -f "$GIT_BASH_COMPLETION" ] && source "$GIT_BASH_COMPLETION"
if [ -f "$GIT_PS1" ] ; then
source "$GIT_PS1"
export PS1='[\A] $(tput setaf 2)\u$(tput sgr0):\w$(tput setaf 1)$(__git_ps1 " (%s)")$(tput sgr0) $ '
else
export PS1="[\A] $(tput setaf 2)\u$(tput sgr0):\w $ "
@rbsgn
rbsgn / gist:205d619bdb5dfa5f8489
Created June 29, 2015 07:45
Merge pull request from the command line
  1. git ls-remote origin to find pull request you want to merge. Usually their names start with refs/pull-requests/$ID/from (Atlassian Stash style) or refs/pull/$ID/head (GitHub style).
  2. git fetch origin refs/pull-requests/$ID/from or git fetch origin refs/pull/$ID/head and work with the branch from FETCH_HEAD
@rbsgn
rbsgn / FBAnimationPerformanceTracker.h
Last active August 29, 2015 14:25 — forked from clementgenzmer/FBAnimationPerformanceTracker.h
FBAnimationPerformanceTracker
/*
* This is an example provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
// YSTableViewCells.h
//
// A set of cells for implementing Preferences-like tables.
//
// Copyright (c) 2009, Andrey Tarantsov <andreyvit@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// YSTableViewCells.h
//
// A set of cells for implementing Preferences-like tables.
//
// Copyright (c) 2009, Andrey Tarantsov <andreyvit@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// YSTableViewCells.h
//
// A set of cells for implementing Preferences-like tables.
//
// Copyright (c) 2009, Andrey Tarantsov <andreyvit@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// YSTableViewCells.h
//
// A set of cells for implementing Preferences-like tables.
//
// Copyright (c) 2009, Andrey Tarantsov <andreyvit@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// YSTableViewCells.h
//
// A set of cells for implementing Preferences-like tables.
//
// Copyright (c) 2009, Andrey Tarantsov <andreyvit@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// YSTableViewCells.h
//
// A set of cells for implementing Preferences-like tables.
//
// Copyright (c) 2009, Andrey Tarantsov <andreyvit@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//