Skip to content

Instantly share code, notes, and snippets.

View cahsowan's full-sized avatar

Taufik Rahman cahsowan

View GitHub Profile
@cahsowan
cahsowan / gulpfile.js
Created October 12, 2014 14:32
Gulpfile for angular project
var gulp = require('gulp'),
connect = require('gulp-connect'),
minifyCSS = require('gulp-minify-css'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
ngAnnotate = require('gulp-ng-annotate'),
templateCache = require('gulp-angular-templatecache');
var jsDir = [
'./assets/js/app.js',
@cahsowan
cahsowan / hitung_vocal
Last active August 29, 2015 14:10
Hitung Jumlah Huruf Vocal
<?php
$name = 'taufik rahman';
echo $name;
echo "<br>";
$name_arr = str_split($name);
// AYO HITUNG JUMLAH HURUF VOCAL
$vocal = ['a','e','i','u','o'];
@cahsowan
cahsowan / upload.php
Created March 31, 2015 04:49
Example of upload file using PHP
<?php
$data = json_decode(file_get_contents('data.txt'), true) ?: [];
$upload_directory = 'upload/';
if ($_POST) {
$fruit = $_POST['fruit'];
$picture = $_FILES['picture'];
if (! empty($fruit) && file_exists($picture['tmp_name'])) {
$data[$fruit] = $upload_directory . $picture['name'];

All binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

VERSION PLATFORM OFFSET ORIGINAL CRACKED
3083 Linux x64 0xcbe3 85 39
3083 Linux x86 0xc6f2 85 39
3083 Win x64 0xe21b3 85 3B
3083 Win x86 0x9eb1a 1a 2a
3083 OSX 0x69cf 85 39
@cahsowan
cahsowan / install-php.sh
Created April 4, 2015 08:44
Shell script to Install LAMP on Ubuntu and varian
#!/usr/bin/env bash
echo "--- Good morning, master. Let's get to work. Installing now. ---"
echo "--- Updating packages list ---"
sudo apt-get update
echo "--- MySQL time ---"
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@cahsowan
cahsowan / dblclick.sh
Created April 4, 2015 08:46
Enable Double Click on Pantheon Files Elementaryos
gsettings set org.pantheon.files.preferences single-click false
@cahsowan
cahsowan / terbilang.php
Created April 21, 2015 04:16
Fungsi Terbilang Dengan PHP
<?php
function terbilang($x) {
$angka = ["", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas"];
if ($x < 12)
return " " . $angka[$x];
elseif ($x < 20)
return terbilang($x - 10) . " belas";
elseif ($x < 100)
@cahsowan
cahsowan / polling.php
Last active November 1, 2016 00:54
Simple example of polling using PHP
<?php
$pertanyaan = "Sistem operasi HP terbaik adalah?";
$pilihan = [
'android' => 'Android',
'ios' => 'iOS',
'wp' => 'Windows Phone'
];
function getData(){
@cahsowan
cahsowan / hitung_vocal.php
Created November 1, 2016 00:59
Hitung Jumlah Huruf Vocal dengan PHP
<?php
function hitung_vocal($kata){
$arr = str_split($kata);
$vocal = ['a', 'i', 'u', 'e', 'o'];
$found = array_intersect($vocal, $arr);
$count = array_count_values($arr);
$result = [];
@cahsowan
cahsowan / css-animation.html
Created November 10, 2016 03:54
Belajar CSS Animation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animation</title>
<style>
.kotak {
width: 100px;
height: 100px;