Skip to content

Instantly share code, notes, and snippets.

View dennistang's full-sized avatar

Dennis Tang dennistang

View GitHub Profile

Google Apps Script Document Utilities

  • getAllLinks.js

  • getAllLinks(element) - returns array of all UrlLinks in Document

  • findAndReplaceLinks(searchPattern,replacement) - changes all matching links in Document

  • changeCase.js - Document add-in, provides case-change operations in the add-in Menu.

  • onOpen - installs "Change Case" menu

  • _changeCase - worker function to locate selected text and change text case. Case conversion is managed via callback to a function that accepts a string as a parameter and returns the converted string.

  • helper functions for five cases

@dennistang
dennistang / HOWTO-bitlbee+hipchat.mkd
Created June 2, 2017 05:20 — forked from taylor/HOWTO-bitlbee+hipchat.mkd
Using bitlbee with HipChat

Using bitlbee with HipChat

Initial setup

  • account add jabber [email protected] 'PASSWORD'
  • account hipchat set nick_source full_name
  • account hipchat set resource bot
  • account hipchat on
@dennistang
dennistang / ubuntu_py3.md
Created October 4, 2016 05:05 — forked from softwaredoug/ubuntu_py3.md
Ubuntu 14.04 Python 3.4.2 Setup using pyenv and pyvenv

What I did to get Python 3.4.2 on Ubuntu 14.04. The stock version of Python 3 on Ubuntu is 3.4.0. Which is missing some of the best parts! (asyncio, etc). Luckily I discovered pyenv which solved my problem.

Install pyenv

Pyenv (not to be confused with pyvenv) is the Python equivelant of rbenv. It lets you configure which Python environment/version is available per directory, user, or other session variables.

I followed the instructions here to install pyenv in my home directory. Verbatem, those instructions are:

sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev virtualenv-clone

Keybase proof

I hereby claim:

  • I am dennistang on github.
  • I am dt (https://keybase.io/dt) on keybase.
  • I have a public key whose fingerprint is 25E1 8242 2B4C A619 2632 EA11 C219 5AF7 84BB 2023

To claim this, I am signing this object:

@dennistang
dennistang / 0_reuse_code.js
Created August 17, 2016 17:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dennistang
dennistang / FLV.php
Created January 24, 2011 07:50 — forked from robbiet480/FLV.php
<?php
if(isset($_REQUEST['file'])) {
echo '<html><head><title>'.$_REQUEST['file'].'</title>
<script type="text/javascript" src="http://include.reinvigorate.net/re_.js"></script>
<script type="text/javascript">
try {
reinvigorate.track("ks74s-857rmjp5v4");
} catch(err) {}
</script>
</head><body style="background: #000;"><h1>