Skip to content

Instantly share code, notes, and snippets.

View derjust's full-sized avatar

Sebastian J. derjust

  • Comcast
  • New York City
View GitHub Profile
@mdlavin
mdlavin / lambda-function-xray-enablement.tf
Last active March 18, 2024 14:38
Terraform configuration to enable X-Ray for a Lambda function
resource "aws_lambda_function" "service" {
# Your usual aws_lambda_function configuration settings here
tracing_config {
mode = "Active"
}
}
func correctFuckingResumeData(data: NSData?) -> NSData? {
let kResumeCurrentRequest = "NSURLSessionResumeCurrentRequest"
let kResumeOriginalRequest = "NSURLSessionResumeOriginalRequest"
guard let data = data, let resumeDictionary = (try? NSPropertyListSerialization.propertyListWithData(data, options: [.MutableContainersAndLeaves], format: nil)) as? NSMutableDictionary else {
return nil
}
resumeDictionary[kResumeCurrentRequest] = correctFuckingRequestData(resumeDictionary[kResumeCurrentRequest] as? NSData)
@skratchdot
skratchdot / donate.md
Created January 25, 2016 17:42
My Paypal donate button in markdown format

Donation Button

Donate

@arnobroekhof
arnobroekhof / pre-commit
Last active May 9, 2022 13:41
Maven pre commit hook
#!/bin/bash
# save the file as <git_directory>/.git/hooks/pre-commit
echo "Running Maven clean test for errors"
# retrieving current working directory
CWD=`pwd`
MAIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# go to main project dir
cd $MAIN_DIR/../../
@dblock
dblock / ActiveDirectoryDecoratorFilter.java
Created June 27, 2012 13:31
Obtain additional user information from ActiveDirectory using Com4J
//
// from http://waffle.codeplex.com/workitem/10034
//
package waffle.servlet.spi;
import java.io.IOException;
import java.security.Principal;
import java.util.Date;
import java.util.Enumeration;
@alirobe
alirobe / html5.master.part
Created February 1, 2012 06:03
On-demand IE9 rendering for SharePoint 2010 Master Pages.
<asp:ContentPlaceHolder runat="server" id="html5">
<-- In your .aspx page, use a override this ContentPlaceHolder using "IE=9" to enable HTML5 features - on pages where it's required... -->
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
</asp:ContentPlaceHolder>