- Don't run as root.
- For sessions, set
httpOnly
(andsecure
totrue
if running over SSL) when setting cookies. - Use the Helmet for secure headers: https://github.com/evilpacket/helmet
- Enable
csrf
for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrf - Don't use the deprecated
bodyParser()
and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use thedefer
property andpipe()
the multipart upload stream to the intended destination.
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
<?php | |
// Our Page Action | |
public function pageAction ( ) { | |
// Prepare our variables for our view | |
// ... | |
// Handle our view | |
return $this->awesomeRender('page.html'); | |
} | |
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
(function(window,undefined){ | |
// Prepare our Variables | |
var | |
document = window.document, | |
$ = window.jQuery; | |
// Wait for Document | |
$(window).bind(function(){ | |
// Prepare Variables |
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 | |
################## | |
# MailHistory.bash | |
# Ken Hansen 01/2010 | |
# | |
# Calc history delta then email to self and evernote | |
# | |
# Called from ~/bash_logout | |
# |
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
(function($){ | |
// Declare the rootUrl used for filtering internal links. | |
var rootUrl = document.location.protocol + '//' + (document.location.hostname || document.location.host) + (document.location.port ? ':' + document.location.port : '') + '/'; | |
// Helper functions | |
var getFragment = function(url, root) { // Grab the fragment and format it how Backbone expects | |
var fragment = url; | |
if (fragment.indexOf(':') !== -1) | |
fragment = fragment.replace(/.*:\/\/[^\/]+/, ''); | |
if (!fragment.indexOf(root)) fragment = fragment.substr(root.length); |
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
# Adapted from https://gist.github.com/henriquemoody/3288681 | |
#!/bin/sh | |
SHORTCUT="[Desktop Entry] | |
Name=Sublime Text 2 | |
Comment=Edit text files | |
Exec=/usr/local/sublime-text-2/sublime_text | |
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png | |
Terminal=false | |
Type=Application |
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
Complete installation process: | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev | |
sudo apt-get update | |
sudo apt-get upgrade | |
cd ~ | |
mkdir git | |
cd ~/git |
- quay.io (now acquired by CoreOS)
- 5/10/20/50/125 private repositories for $12/$25/$50/$100/$200 (it was $7/$12/$22 for 5/10/20 repositories before) per month
- unlimited public repositories
- Reesd
- 10GB/25GB/50GB for €20/€45/€80 per month
- Illimited number of repositories/images/layers, only compressed layer space counts.
- Disclaimer: it is a project of mine.
- Now in beta :-)
##RPM Packages##
sudo yum install qt-devel protobuff-devel qrencode-devel
##Switch to user bitcoind##
sudo useradd bitcoind
sudo su - bitcoind
mkdir bitcoind
mkdir bitcoind/deps
OlderNewer