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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# <bitbar.title>Yahoo Finance Stock Ticker</bitbar.title> | |
# <bitbar.version>1.0</bitbar.version> | |
# <bitbar.author>Michael.K</bitbar.author> | |
# <bitbar.author.github>michael34435</bitbar.author.github> | |
# <bitbar.desc>Provides a rotating stock ticker in your menu bar</bitbar.desc> | |
# <bitbar.image>https://s3.amazonaws.com/jamieson.io/bitbar_gfinance.png</bitbar.image> | |
# <bitbar.dependencies>python</bitbar.dependencies> | |
import urllib2 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
function ansi() { | |
bold= | |
color= | |
if [[ -z "$2" ]]; then | |
color="0" | |
else | |
color="$2" | |
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
#!/bin/sh | |
# | |
# Automatic configuration of a VPN on GCE debian-7-wheezy server. | |
# Tested only on debian-7-wheezy. | |
# | |
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 | |
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ | |
# | |
# Thx to: https://github.com/sarfata/voodooprivacy/blob/master/voodoo-vpn.sh for the code/idea | |
# |
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 | |
function ansi() { | |
bold= | |
color= | |
if [[ -z "$2" ]]; then | |
color="0" | |
else | |
color="$2" | |
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
<?php | |
class Example | |
{ | |
public function foo1() | |
{ | |
} | |
} |
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 | |
class Example | |
{ | |
public function foo1() | |
{ | |
} | |
public function foo2() |
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 | |
$foo = new Foo\Bar(); |
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 | |
$fileStr = file_get_contents(YOUR_PHP_FILE_PATH); | |
$fileContent = ""; | |
$commentTokens = [T_COMMENT]; | |
$commentTokens[] = defined('T_DOC_COMMENT') ? T_DOC_COMMENT : T_ML_COMMENT; | |
$tokens = token_get_all($fileStr); | |
foreach ($tokens as $token) { |
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 | |
/** | |
* @use Foo\Bar | |
*/ | |
class Foo | |
{ | |
public function bar() | |
{ | |
$bar = new Bar(); |