Skip to content

Instantly share code, notes, and snippets.

@dwiash
dwiash / rsync_lewat_ssh.sh
Created March 10, 2010 07:16
Contoh penggunaan rsync
# men-rsync dari /folder/sumber/ menuju /folder/tujuan/ yang berada pada host 192.168.1.101
rsync -av --progress -e ssh /folder/sumber/ dwiasharialdy@192.168.1.101:/folder/tujuan/
@dwiash
dwiash / gist:347547
Created March 29, 2010 07:20
Menampilkan git log dalam format yang enak untuk dilihat
git log --graph --pretty=format:"%Cred%h %Creset[%ai] %Cblue%s" --color
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8 />
<title>Untitled</title>
<!--
<link rel="stylesheet" href="/path/to/style.css" type="text/css" />
-->
$("<style type='text/css'> .hovrd{border : 1px solid #ff0000} </style>").appendTo("head");
$('div').hover(
function(){
$(this).addClass('hovrd')
},
function(){
$(this).removeClass('hovrd')
}
);
# to run this script, type this line in your console:
#
# $ ruby alien_language.rb < input_file.txt > output_file.txt
#
#
# this script tested with ruby 1.8.7 patchlevel 72
input_array = readlines
var = input_array[0].split(" ")
inputArray = readlines
case_num = inputArray.shift
test_case = []
h = 0
w = 0
counter = 0
temp_arr = []
inputArray.each do
wget http://situs.com/1/nama-{1..12}.jpg; rename 's/nama/nama1/' *nama-*.jpg
@dwiash
dwiash / .bashrc
Created December 8, 2010 14:11
My .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@dwiash
dwiash / gist:764969
Created January 4, 2011 16:08
mixcolor.php
<style>
pre{
margin: 0;
padding: 7px 0;
}
</style>
<?php
function rgb2hsv ($RGB)
{
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif