Skip to content

Instantly share code, notes, and snippets.

View remoharsono's full-sized avatar

Remo Harsono remoharsono

View GitHub Profile
@remoharsono
remoharsono / aes_example.py
Last active June 25, 2016 03:01
Python AES two-way encryption/decryption example
from Crypto.Cipher import AES
import base64
import os
# the block size for the cipher object; must be 16, 24, or 32 for AES
BLOCK_SIZE = 32
# the character used for padding--with a block cipher such as AES, the value
# you encrypt must be a multiple of BLOCK_SIZE in length. This character is
# used to ensure that your value is always a multiple of BLOCK_SIZE
//Check if the placeholder is inside an iframe(nested iframe due to some sites auto refresh feature,
//if true redirect to targetUrl.
if(typeof targetUrl === 'undefined' || targetUrl === null){
targetUrl = decodeURIComponent(params["a"]);
}
if (self !== top) {
self.location.href = targetUrl;
}
//Begin:Global Parameters
<?php
// Twitter Auto-follow Script by Dave Stevens - http://davestevens.co.uk
$user = "";
$pass = "";
$term = "";
$userApiUrl = "http://twitter.com/statuses/friends.json";
<!DOCTYPE HTML>
<!--
/*
* Remote File Copy Demo 1.0
*
* Copyright 2012, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
@remoharsono
remoharsono / Javascript - Prime Number
Last active December 19, 2015 03:38 — forked from jfmercer/prime_numbers.js
Prime Number Checker in Nodejs
//
// Created by John F. Mercer on Monday, December 5, 2011
// [email protected]
//
// tested on node 0.6.4 and express 2.5.1
//
var express = require('express'),
app = express.createServer();
app.use(express.logger());