I've moved this to a repo as it's easier to see what's going on:
This file contains 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
#include <boost/stacktrace.hpp> | |
// ..... | |
auto re_stacktrace = boost::stacktrace::stacktrace(); | |
for(boost::stacktrace::frame frame: re_stacktrace) { | |
if(frame.empty() == false) { | |
qCritical("STACK -- %s %s:%d %d", frame.name().c_str(), frame.source_file().c_str(), frame.source_line(), frame.address()); | |
} |
This file contains 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
/** @CustomFunction */ | |
function incomeTax(pay: number): number { | |
var additionalTax = 0; | |
var higherTax = 0; | |
var basicTax = 0; | |
var personalAllowanceToRemove = Math.floor((pay - 100000) / 2); | |
var defaultPersonalAllowance = 12570; |
This file contains 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
/* | |
* Returns Dell Warranty for service tag using APIKey | |
* | |
* @param {apiKey} API Key from techdirect | |
* @param {serviceTag} the ServiceTag desired | |
* @param {headers} Include headers in output | |
* @return The description and warranty status | |
*/ | |
function getDellWarranty(clientId, clientSecret, serviceTag, headers) { |
This file contains 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
// ==UserScript== | |
// @name GMail - Mark Page As Read | |
// @namespace gmail | |
// @include https://mail.google.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; |
This file contains 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
[Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
function screenshot([Drawing.Rectangle]$bounds, $path) { | |
$bmp = New-Object Drawing.Bitmap $bounds.width, $bounds.height | |
$graphics = [Drawing.Graphics]::FromImage($bmp) | |
$graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size) | |
$bmp.Save($path) | |
$graphics.Dispose() |
This file contains 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
#installed packages | |
Get-AppXPackage | Select Name | |
#automatically downloaded apps when clicked: | |
Get-AppXProvisionedPackage -Online | Select DisplayName | |
#Remove Package: | |
Get-AppXPackage Microsoft.Office.OneNote | remove-appxpackage | |
#Remove Provisioned Package: | |
Remove-AppXProvisionedPackage -Online -PackageName (Get-AppXProvisionedPackage -Online | ? { $_.DisplayName -like "Microsoft.Office.OneNote" }).PackageName |
This file contains 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 | |
# put new bonded configuration in interfaces.bonded and cd into /etc/network | |
ifdown -a; mv interfaces interfaces.old; mv interfaces.new interfaces; ifup lo; ifup bond0 & ifup eth0; ifup eth1; |
This file contains 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 strict; | |
use warnings; | |
open INPUT, "./robtest.txt"; | |
while(<INPUT) { | |
chomp; | |
print "line: '$_'\n"; | |
} |
This file contains 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/perl -w | |
# William Lam | |
# 12/10/2009 | |
# http://engineering.ucsb.edu/~duonglt/vmware/ | |
# http://communities.vmware.com/docs/DOC-9852 | |
use strict; | |
use warnings; | |
use IO::Socket::SSL; | |
use Term::ANSIColor; |
NewerOlder