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
# | |
# Author: Tad DeVries | |
# Email: taddevries@gmail.com | |
# FileName: RunElevated.ps1 | |
# | |
# Description: | |
# Creates a "sudo" like command to elevate another | |
# command to administrative level. This is used to | |
# simplify the CLI interaction and create a little | |
# home like feeling for the *nix users out there. |
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
package com.example.app | |
import org.scalatra._ | |
import servlet.{SizeConstraintExceededException, FileUploadSupport} | |
import scalate.ScalateSupport | |
import java.io.ByteArrayInputStream | |
import org.apache.poi.ss.usermodel.WorkbookFactory | |
import org.apache.poi.ss.usermodel.Cell | |
import org.apache.poi.ss.usermodel.DataFormatter | |
import org.apache.poi.ss.usermodel.DateUtil |
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 <iostream> | |
using namespace std; | |
class Monster { | |
public: | |
Monster(); | |
Monster(int initial_hp); | |
~Monster(); | |
void attack() const; |
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
using ImpromptuInterface; | |
using Newtonsoft.Json.Linq; | |
/* | |
* This example was inspired by | |
* "Serialization is Lossy" | |
* http://kellabyte.com/2013/05/02/serialization-is-lossy/ | |
*/ | |
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
sudo ipfw pipe 1 config bw 150kbit/s delay 150ms | |
sudo ipfw add pipe 1 dst-ip 0.0.0.0/0 | |
# do slow stuff | |
# done: | |
sudo ipfw flush |
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
SELECT QueryPlanHash, | |
CASE WHEN QueryType LIKE '%Stored Procedure%' THEN | |
QueryPlan.value('declare namespace p="http://schemas.microsoft.com/sqlserver/2004/07/showplan"; | |
sum(//p:StmtSimple/@StatementSubTreeCost)', 'float') | |
ELSE | |
QueryPlan.value('declare namespace p="http://schemas.microsoft.com/sqlserver/2004/07/showplan"; | |
sum(//p:StmtSimple[xs:hexBinary(substring(@QueryPlanHash, 3)) = xs:hexBinary(sql:column("QueryPlanHash"))]/@StatementSubTreeCost)', 'float') | |
END AS cost, * | |
FROM #procs |
NewerOlder