Skip to content

Instantly share code, notes, and snippets.

View chez14's full-sized avatar

Chris Qiang chez14

View GitHub Profile
@chez14
chez14 / encrypt_openssl.txt
Created June 4, 2017 15:04 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL
For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt
For Asymmetric encryption you must first generate your private key and extract the public key.
@chez14
chez14 / EasyBitString.java
Created May 21, 2017 14:15
BitString? No Problem
public class EasyBitString {
/**
* Generate BitString secara brutal
* Well, best option kalo cara yang dari modul nggak inget sama sekali.
*
* Cara:
* Buat komputer menghitung 1 hingga angka tertentu, lalu kita conver angka
* tersebut jadi bitstring. Kita dapat menggunakan kelas Integer untuk
* melakukan hal serupa.
<?php
$array = array (
'foo',
'bar',
'baz'
);
$hasil = array();
$count = count($array);
for ($i = 0; $i < $count; $i++)
$hasil=[$array[$count-$i-1]=>$hasil];
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.3.min.js" type="text/javascript"/></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.7/jquery.slimscroll.js" type="text/javascript"></script>
<title>Tes~</title>
</head>
@chez14
chez14 / Fernando.html
Last active April 16, 2016 12:57
Latihan pake Modal sama Form inputnya Bootstrap~
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.3.min.js" type="text/javascript"/></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.7/jquery.slimscroll.js" type="text/javascript"></script>
<title>Tes~</title>
</head>
@chez14
chez14 / hardian.js
Last active October 13, 2015 11:49
memudahkan menstruktur template.
/*
Hardian.js
Memudahkan kami untuk mestruktur template.
*/
var nav = {
pengaturan: {
waktuTransisi: 500
},
init: function(){
var aku = this;