Skip to content

Instantly share code, notes, and snippets.

View drewdeponte's full-sized avatar

Drew De Ponte drewdeponte

View GitHub Profile
function inspect(obj) {
for (prop in obj) {
console.log(typeof(obj[prop]) + " - " + prop + ": " + obj[prop]);
if ((typeof(obj[prop]) == 'object') && (obj[prop] != null)) {
inspect(obj[prop]);
}
}
}
so in process its semantically different behind the scenes
from how windows does it but its syntactically equivalent
as you can see from the email. all you have to do is set
up the macros correctly, its great.
Check out this link
http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Code-Gen-Options.html#Code-Gen-Options
and follow the two links it provides they are good resources.
your an oam
svn log | grep -E "r[0-9]+ \| [a-z]+ \|" | awk '{print $3}' | sort | uniq
Need to get a listing of the triggers that exist in your database. Use the following:
mysql> show triggers;
Show triggers method sometimes doesn't show all of the triggers for some reason so you might want to access the triggers directly via the following:
mysql> select trigger_schema, trigger_name, action_statement from information_schema.triggers
select t.category as type, t.date_submitted as time, t.last_updated as changetime, p.name as component, t.severity as severity, t.priority as priority, o.username as owner, u.username as reporter, '' as cc, '' as url, t.version as version, 'Pending' as milestone, t.status as status, t.resolution as resolution, t.summary as summary, HEX(tt.description) as decription, '' as keywords from mantis_bug_table as t INNER JOIN mantis_user_table as u ON u.id = t.reporter_id LEFT JOIN mantis_project_table as p ON p.id = t.project_id LEFT JOIN mantis_user_table as o ON o.id = t.handler_id LEFT JOIN mantis_bug_text_table as tt ON tt.id = t.bug_text_id INTO OUTFILE '/tmp/mantistestshit3.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
I found the below bits after doing some research on ProxyCommand at http://blog.chmouel.com/2009/02/08/proxycommand-ssh-bastion-proxy/
It becomes very useful when you are using a bastion server as well as useful in many other ways.
Host mygw
HostName bastion.server.host.name
ProxyCommand none
# ControlMaster auto
# ControlPath ~/.ssh/master-%r@%h:%p
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "convert-repo" ] || [ "$GIT_COMMITTER_NAME" = "some_other_name" ];
then
GIT_COMMITTER_NAME="Some Name Here";
GIT_AUTHOR_NAME="Some Name Here";
GIT_COMMITTER_EMAIL="<someemail@here.com>";
GIT_AUTHOR_EMAIL="<someemail@here.com>";
git commit-tree "$@";
else
git commit-tree "$@";
#!/usr/bin/env ruby
require 'date'
d = Date.today
puts d.cweek()
@drewdeponte
drewdeponte / memcached.plist
Created October 28, 2010 19:44
~/Library/LaunchAgents/memcached.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>memcached</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/memcached</string>
<string>-l</string>
@drewdeponte
drewdeponte / gist:737766
Created December 12, 2010 01:19
google maps javascript test
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"