Skip to content

Instantly share code, notes, and snippets.

View Tantas's full-sized avatar

Joseph Preiss Tantas

  • Toronto Area, Ontario, Canada
View GitHub Profile
@Tantas
Tantas / create_tomcat_run_user.sh
Created August 6, 2014 00:13
Creates a tomcat run user.
#!/bin/bash
# Create a tomcat run user and apply ownership.
# Example used for DotCMS.
echo "This is a guide. Do not execute this as a script."
exit -1
# Create a group with no permissions
sudo groupadd dotcmsusers
@Tantas
Tantas / create_sftp_server_guide.sh
Created August 6, 2014 00:08
Create SFTP Server Guide
#!/bin/bash
# Create SFTP Server Steps
echo "This is a guide. Do not execute this as a script."
exit -1
# Create a restricted user with:
# -no shell access
# -no ssh access
# -no application access
#import <SpriteKit/SpriteKit.h>
#import <AGGeometryKit.h>
@interface SKShapeNode (Cuttable)
-(NSArray*)cutWithLine:(AGKLine)cutLine;
@end
@Tantas
Tantas / SKShapeNode+Area.h
Created July 31, 2014 01:43
SKShapeNode+Area
#import <SpriteKit/SpriteKit.h>
@interface SKShapeNode (Area)
-(float) area;
@end
@Tantas
Tantas / gist:0646fc06de60e3f80ec6
Last active August 29, 2015 14:04
Acanac ISP Health Check
#!/bin/bash
#===============================================================================
# from https://gist.github.com/Tantas/5412d1e319c69d0d56ab
stripEncodedLineEndings() {
# stripEncodedLineEndings <string>
local stripFirstPart="${1//%0D}"
echo "${stripFirstPart//%0A}"
}
@Tantas
Tantas / gist:5412d1e319c69d0d56ab
Last active August 29, 2015 14:04 — forked from cdown/gist:1163649
Pure Bash Implementation of URL Decode
stripEncodedLineEndings() {
# stripEncodedLineEndings <string>
local stripFirstPart="${1//%0D}"
echo "${stripFirstPart//%0A}"
}
urlencode() {
# urlencode <string>
@Tantas
Tantas / Offscreen CSS
Created May 7, 2014 17:30
Place off screen in an accessible manner. Useful for hidden labels.
.offscreen {
position: absolute;
left: -999em;
xwidth: 90em;
xoverflow: hidden;
}