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
.offscreen { | |
position: absolute; | |
left: -999em; | |
xwidth: 90em; | |
xoverflow: hidden; | |
} |
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
stripEncodedLineEndings() { | |
# stripEncodedLineEndings <string> | |
local stripFirstPart="${1//%0D}" | |
echo "${stripFirstPart//%0A}" | |
} | |
urlencode() { | |
# urlencode <string> |
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 | |
#=============================================================================== | |
# from https://gist.github.com/Tantas/5412d1e319c69d0d56ab | |
stripEncodedLineEndings() { | |
# stripEncodedLineEndings <string> | |
local stripFirstPart="${1//%0D}" | |
echo "${stripFirstPart//%0A}" | |
} |
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
#import <SpriteKit/SpriteKit.h> | |
@interface SKShapeNode (Area) | |
-(float) area; | |
@end |
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
#import <SpriteKit/SpriteKit.h> | |
#import <AGGeometryKit.h> | |
@interface SKShapeNode (Cuttable) | |
-(NSArray*)cutWithLine:(AGKLine)cutLine; | |
@end |
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 | |
# 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 |
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 | |
# 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 |
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 | |
# Create an rsa key and install on a remote machine. | |
echo "This is a guide. Do not execute this as a script." | |
exit -1 | |
# Create a new rsa key and deploy to a server. Make sure to add a password. | |
ssh-keygen -t rsa -C "username@host" |
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 | |
# Create a self signed SSL cert and install | |
# Generate a private key | |
openssl genrsa -des3 -out server.key 1024 | |
# Generate a CSR (Certificate Signing Request) | |
openssl req -new -key server.key -out server.csr |
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
server.document-root = "/development/directory/to/serve" | |
server.dir-listing = "enable" | |
server.port = 80 | |
mimetype.assign = ( | |
".png" => "image/png", | |
".jpg" => "image/jpeg", | |
".xml" => "text/xml", | |
".html" => "text/html", |
OlderNewer