Skip to content

Instantly share code, notes, and snippets.

export EC2_KEYPAIR=<your keypair name> # name only, not the file name
export EC2_URL=https://ec2.<your ec2 region>.amazonaws.com
export EC2_PRIVATE_KEY=$HOME/<where your private key is>/pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_CERT=$HOME/<where your certificate is>/cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
@weivall
weivall / index.html
Created February 12, 2013 09:31
A CodePen by Andrey. 3D objects in CSS - This is a demo for my blog post on creating 3D Worlds in HTML and CSS: http://blog.keithclark.co.uk/creating-3d-worlds-with-html-and-css/
<input id="box-toggle" type="checkbox">
<label for="box-toggle">Show geometry</label>
@weivall
weivall / index.html
Created February 12, 2013 09:31
A CodePen by Andrey. 3D objects in CSS - This is a demo for my blog post on creating 3D Worlds in HTML and CSS: http://blog.keithclark.co.uk/creating-3d-worlds-with-html-and-css/
<input id="box-toggle" type="checkbox">
<label for="box-toggle">Show geometry</label>
@weivall
weivall / load mysql file through php
Created January 18, 2013 14:50
load mysql file through php
<?php
ini_set('memory_limit', '5120M');
set_time_limit ( 0 );
/***************************************************************************
* sql_parse.php
* -------------------
* begin : Thu May 31, 2001
* copyright : (C) 2001 The phpBB Group
* email : [email protected]
@weivall
weivall / gist:4146990
Created November 26, 2012 07:15
w00tw00t.at.blackhats.romanian.anti-sec
#http://www.securityweek.com/hacked-mit-server-used-stage-attacks-scan-vulnerabilities
Using mod-rewrite in HTACCESS can filter these scans, redirecting them to your main domain or elsewhere, such as a 403 page.
RewriteCond %{REQUEST_URI} ^(.*)//+(.*)$
RewriteRule / http: //www.example.com/%1/%2 [R=301,L]
@weivall
weivall / gist:3885888
Created October 13, 2012 19:42
on resize timeout
var flag = false;
$(window).resize(function(){
if(flag === false){
setTimeout(function(){
$( '.scroll-pane' ).jScrollPane();
flag = false;
}, 300);
}
flag = true;
});
@weivall
weivall / gist:3877899
Created October 12, 2012 08:03
google map coordinates
gApplication.getMap().getCenter()
@weivall
weivall / gist:3814224
Created October 1, 2012 20:28
Facebook share link || Twitter share link
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>link or image</a>
<a href="http://www.twitter.com/share?url=http://www.google.com/>Tweet</a>
@weivall
weivall / gist:3742219
Created September 18, 2012 09:21
meta tags
<meta http-equiv="Imagetoolbar" content="no" />
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="" />
@weivall
weivall / gist:3675345
Created September 8, 2012 14:19
stargazer init.d for CentOS 6
#!/bin/bash
#
# processname: stargazer
# config: /etc/stargazer/stargazer.conf
# pidfile: /var/run/stargazer.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.