Skip to content

Instantly share code, notes, and snippets.

View selftaught's full-sized avatar

selftaught selftaught

  • Bluehost
  • Portland
View GitHub Profile
for(Room1* room = me->pAct->pRoom1; room != NULL; room = room->pNextRoom) {
for(UnitAny* unit = room->pUnitFirst; unit != NULL; unit = unit->pListNext) {
if(unit->dwType == 1) {
draw_cross(unit->pPath->xPos, unit->pPath->yPos);
}
}
}
@selftaught
selftaught / New TLDs whois servers
Created August 7, 2015 20:13
New TLDs whois servers
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2015-03-16
##
\.ac$ whois.nic.ac
\.academy$ whois.donuts.co
\.accountants$ whois.donuts.co
\.active$ whois.afilias-srs.net
\.actor$ whois.unitedtld.com
<VirtualHost *:80>
ServerName projects.layer8games.com
ProxyPass / http://projects.layer8games.com:7990/
ProxyPassReverse / http://projects.layer8games.com:7990/
</VirtualHost>
browser.addCommand('get_sessid_from_url', function() {
var sess_id;
browser.url(function(err, res) {
sess_id = url.value.match(/^https:\/\/(\d+)\./)[1];
});
return sess_id;
});
browser.addCommand('get_sessid_from_url', function (c) {
return browser.url().then(function(res) {
return res.value.match(/^https:\/\/(\d+)\./)[1];
});
});
// Usage
it('navigate to cgi/wordpress_tools', function*() {
sess_id = yield browser.get_sessid_from_url();
#-----------------------------------------------------------------------------------------------------
# _find_element(value, ftype)
# @param string value: xpath, name, link_text, partial_link_text, tag_name, class_name, css_selector
# @param string ftype: "
# @return (False|element)
#-----------------------------------------------------------------------------------------------------
def _find_element(self, value, ftype):
element = False
try:
if (ftype == 'xpath' ): element = self.driver.find_element_by_xpath (value)
@selftaught
selftaught / tmux-cheatsheet.markdown
Created October 23, 2015 02:46 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2015-09-12
##
\.abbott$ whois.afilias-srs.net
\.abogado$ whois-dub.mm-registry.com
\.ac$ whois.nic.ac
\.academy$ whois.donuts.co
\.accountant$ whois.nic.accountant
_____________________________________
/ QOTD: \
| |
| "You're so dumb you don't even have |
\ wisdom teeth." /
-------------------------------------
\
\
.--.
|o_o |
@selftaught
selftaught / show git branch in bash profile
Created February 24, 2016 18:32
add this to ~/.bashrc
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "