Skip to content

Instantly share code, notes, and snippets.

View booyaa's full-sized avatar
🏠
Working from home forevah!

Mark Sta Ana booyaa

🏠
Working from home forevah!
View GitHub Profile
@booyaa
booyaa / gist:3142912
Created July 19, 2012 10:29
Lotus Notes toolbar buttons for developers

How to use (assumes you're using Notes 8.5)

  1. File > Preferences > Toolbar > Customize
  2. New button
  3. Paste the code into the formula
  4. Profit

Get the Replica ID of open database

@booyaa
booyaa / gist:3937542
Created October 23, 2012 08:03
vps on 34sp.com
traceroute to api.nodejitsu.com (165.225.130.178), 30 hops max, 60 byte packets
1 80.82.113.65 (80.82.113.65) 0.042 ms 0.026 ms 0.025 ms
2 ge0-0.r4.man1.34sp.com (80.82.127.61) 6.500 ms 6.507 ms 6.621 ms
3 ae2-109.man11.ip4.tinet.net (77.67.75.161) 14.871 ms 14.879 ms 14.863 ms
4 xe-4-3-0.was12.ip4.tinet.net (213.200.80.25) 88.456 ms xe-9-2-1.was14.ip4.tinet.net (89.149.187.138) 91.850 ms 91.985 ms
5 internap-gw.ip4.tinet.net (77.67.69.254) 85.880 ms 84.335 ms 85.941 ms
6 border10.pc2-bbnet2.wdc002.pnap.net (216.52.127.73) 85.791 ms border10.pc1-bbnet1.wdc002.pnap.net (216.52.127.9) 82.345 ms border10.pc2-bbnet2.wdc002.pnap.net (216.52.127.73) 85.301 ms
7 * * *
8 * * *
@booyaa
booyaa / gist:3937571
Created October 23, 2012 08:09
babbage (london hackspace shell account)
traceroute to api.nodejitsu.com (165.225.130.178), 30 hops max, 60 byte packets
1 church.lan.hack.rs (172.31.24.3) 0.224 ms 0.189 ms 0.175 ms
2 * * *
3 telefonica-international-wholesale.ethernet21-2.ar9.lon3.gblx.net (64.212.32.90) 4.909 ms 5.108 ms O2UK-5-0-8-GRTLONTL1.6.16.84.in-addr.arpa (84.16.6.190) 5.553 ms
4 ethernet21-3.ar9.lon3.gblx.net (64.212.34.205) 16.461 ms xe4-1-6-0-GRTLONTL1.red.telefonica-wholesale.net (94.142.103.137) 89.849 ms ethernet21-3.ar9.lon3.gblx.net (64.212.34.205) 15.939 ms
5 xe2-0-8-0-grtlontl3.red.telefonica-wholesale.net (84.16.12.14) 5.288 ms 5.974 ms ae5.scr3.LON3.gblx.net (67.17.72.22) 6.301 ms
6 xe-0-4-0-3.r02.londen03.uk.bb.gin.ntt.net (129.250.9.129) 7.360 ms te7-4-10G.ar6.LON3.gblx.net (67.16.144.249) 33.821 ms 33.831 ms
7 p1-0.globalcrossing.londen03.uk.bb.gin.ntt.net (208.50.13.146) 7.074 ms 5.135 ms ae-4.r22.londen03.uk.bb.gin.ntt.net (129.250.5.24) 5.420 ms
8 ae-4.r22.londen03.uk.bb.gin.ntt.net (129.250.5.24) 5.671 ms as-0.r22.nycmn
@booyaa
booyaa / gist:3938266
Created October 23, 2012 11:23
traceroute from 34sp to api.nodejitsu.com (when it works)
traceroute to api.nodejitsu.com (165.225.130.178), 30 hops max, 60 byte packets
1 80.82.113.65 (80.82.113.65) 0.054 ms 0.019 ms 0.016 ms
2 ge0-0.r4.man1.34sp.com (80.82.127.61) 11.036 ms 11.021 ms 11.067 ms
3 ae2-109.man11.ip4.tinet.net (77.67.75.161) 10.797 ms 10.795 ms 10.776 ms
4 xe-4-3-0.was12.ip4.tinet.net (213.200.80.25) 104.788 ms xe-9-2-1.was14.ip4.tinet.net (89.149.187.138) 104.801 ms 104.795 ms
5 internap-gw.ip4.tinet.net (77.67.69.254) 85.216 ms 85.231 ms 82.246 ms
6 border10.pc1-bbnet1.wdc002.pnap.net (216.52.127.9) 82.648 ms 85.435 ms 85.412 ms
7 joyent-1.border10.wdc002.pnap.net (64.94.31.202) 94.339 ms 85.163 ms 85.132 ms
8 165.225.130.178 (165.225.130.178) 82.390 ms 85.134 ms 82.381 ms
@booyaa
booyaa / gist:3944974
Created October 24, 2012 09:04
fixperms.sh
for i in `ls /home`
do
chown -R $i:$i $i
done
@booyaa
booyaa / gist:3945485
Created October 24, 2012 11:04
Query Active Directory using SQL
SELECT sAMAccountName
,Name
,userAccountControl
,givenName
,sn
FROM 'LDAP://DC=domain,DC=co,DC=uk'
WHERE sAMAccountType = 805306368
AND userAccountControl = 512
ORDER BY sAMAccountName ASC
@booyaa
booyaa / CallSproc.cs
Created October 24, 2012 13:50
How to call a stored proc with parameters in C#
//Useful for SSIS Script Tasks
SqlConnection conn;
SqlCommand comm;
String logMessage = "";
try
{
Dts.VariableDispenser.GetVariables(ref vars);
@booyaa
booyaa / timeGents.js
Created October 26, 2012 09:49
Timespan calculator
#!/usr/bin/env node
// Calculators time difference, if you don't provide a 2nd arg it assumes you want the diff
// between 1st arg and the current timestamp
var start, finish, delta, timeParts;
console.log("args: " + process.argv.length);
process.argv.forEach(function (val, index, array) {
@booyaa
booyaa / SsisPkgSemVer.md
Last active September 21, 2022 09:56
SSIS package semver example

i've created a User variable called VersionString with this expression code.

@[System::MachineName] + " v" + (DT_STR,4,1252) @[System::VersionMajor] + "." + (DT_STR,4,1252) @[System::VersionMinor] + "." + (DT_STR,4,1252) @[System::VersionBuild]

n.b. I ended up ditching creating an extraneous variable called ```VersionPatch`` because you can't query it via msdb.dbo.sysssispackages so it's fucking useless.

references

where it all began - http://semver.org/ tl;dr - major - breaking changes, minor - feature, with backward compatibility, build - patches and unfortunately saves. heavily inspired by http://sqlblog.com/blogs/andy_leonard/archive/2010/01/06/ssis-snack-package-version.aspx