Skip to content

Instantly share code, notes, and snippets.

@manuks
manuks / aes.js
Created August 14, 2015 10:56
Node js aes-256-cbc encryption and decryption
var keyhex = "8479768f48481eeb9c8304ce0a58481eeb9c8304ce0a5e3cb5e3cb58479768f4"; //length 32
var blockSize = 16;
function encryptAES(input) {
try {
var iv = require('crypto').randomBytes(16);
//console.info('iv',iv);
var data = new Buffer(input).toString('binary');
//console.info('data',data);
@manuks
manuks / cover.php
Last active August 29, 2015 14:06
To hide project until is released
<?php
/*
.htaccess
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !.*cover=1.*
RewriteCond %{REQUEST_URI} !^/cover.php
RewriteRule .* cover.php [R=302,L]
#!/bin/bash
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
refex="$7"
branch=${refname#refs/heads/}
# Make a temp directory for writing the .jshintrc file