Skip to content

Instantly share code, notes, and snippets.

Rahmat Awaludin rawaludin

Block or report user

Report or block rawaludin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rawaludin
rawaludin / Ubuntu: Bash daily command
Created Oct 28, 2012
Usefull daily bash command
View Ubuntu: Bash daily command
Usefull bash command
Resize Image >>
convert -resize 50% source.png dest.jpg
convert -resize 1024X768 source.png dest.jpg
Compress jpeg
jpegoptim *.JPG –max=50
@rawaludin
rawaludin / gist:4103884
Created Nov 18, 2012
jquery: toTop watcher
View gist:4103884
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery(document).ready(function($) {
$(window).scroll(function() {
if($(this).scrollTop() != 0) {
$("#toTop").fadeIn();
} else {
$("#toTop").fadeOut();
}
});
@rawaludin
rawaludin / gist:4110578
Created Nov 19, 2012
jquery : smooth scroll
View gist:4110578
$(document).ready(function() {
// animation of navigation
$(function() {
$('.nav-collapse .nav li a').bind('click',function(event){
var anchor = $(this);
$('html, body').stop().animate({
scrollTop: $(anchor.attr('href')).offset().top - $('.navbar-inner').height() - ($('.navbar-inner').height()/4.8)
}, 1500/*,'easeInOutExpo'*/);
View PabrikSepeda1
class PabrikSepeda {
public static void main(String[] args) {
Sepeda ThrillAgent = new Sepeda();
ThrillAgent.merk = "Wim Cycle";
ThrillAgent.kecepatan = 0;
ThrillAgent.tambahKecepatan();
ThrillAgent.tambahKecepatan();
ThrillAgent.tambahKecepatan();
ThrillAgent.tambahKecepatan();
ThrillAgent.tambahKecepatan();
View Sepeda
class Sepeda {
public int posisiGigi;
public int kecepatan;
public String merk;
Sepeda() {
this.posisiGigi = 3;
this.kecepatan = 20;
this.merk = "Polygon";
}
View PabrikSepeda2
class PabrikSepeda2 {
public static void main(String[] args) {
Sepeda Dominate = new Sepeda();
Dominate.cetakKecepatan();
Sepeda RodaTiga = new Sepeda("Family", 100);
RodaTiga.cetakKecepatan();
}
}
@rawaludin
rawaludin / Burung.java
Last active Dec 12, 2015
belajar visibility
View Burung.java
class Burung {
public int jmlSayap;
private int jmlKaki;
protected String jenis;
String warna;
public void setJmlKaki(int jumlah) {
this.jmlKaki = jumlah;
}
View TamanBurung.java
class TamanBurung {
public static void main(String[] args) {
Burung Kakatua = new Burung();
// Ini akan berhasil
Kakatua.jmlSayap = 2;
System.out.println("Jumlah sayap kakatua: "+Kakatua.jmlSayap);
// Ini akan error, karena private
// Kakatua.jmlKaki = 2;
View Vertebrata.java
class Vertebrata {
public int tulangBelakang;
Vertebrata() {
this.tulangBelakang = 1;
}
public void jalanKaki() {
System.out.println("Hewan sedang berjalan...");
}
View Aves.java
class Aves extends Vertebrata {
int sayap;
Aves() {
this.tulangBelakang = 30;
}
public void jalanKaki() {
System.out.println("Burung sedang berjalan...");
}
You can’t perform that action at this time.