Skip to content

Instantly share code, notes, and snippets.

View martinusadyh's full-sized avatar

Martinus Ady H martinusadyh

View GitHub Profile
@martinusadyh
martinusadyh / settings.json
Created November 22, 2019 11:45
Konfigurasi VSCode
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize" : 12
// Controls the line height. Use 0 to compute the lineHeight from the fontSize.
, "editor.lineHeight" : 0
// Controls the font family.
, "editor.fontFamily": "'MesloLGS NF', 'FiraCode-Retina', Menlo, Monaco, 'Courier New', monospace"
, "editor.fontLigatures": true
source ~/.git-prompt.sh
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\][\w$(__git_ps1 " (%s)")]\[\033[00m\]\$ '
StringBuilder sb = new StringBuilder();
sb.append("insert into TestA( ");
sb.append(" kode, keterangan");
sb.append(") ");
sb.append("select dtl.barangKode, brgBU.brgNama1 ");
sb.append("from PurchaseOrderHdr obj ");
sb.append("inner join obj.purchaseOrderDetails dtl ");
sb.append("inner join dtl.barangSID brgBU ");
sb.append("inner join dtl.barangSSGSID brgSSG ");
// Domain class yang terkait
// domain
@MappedSuperclass
public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@martinusadyh
martinusadyh / mvn-pmd.xml
Created January 9, 2015 17:41
Maven PMD Plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.4</version>
<configuration>
<!-- your example configuration here -->
<rulesets>
<ruleset>rulesets/java/coupling.xml</ruleset>
<ruleset>rulesets/java/design.xml</ruleset>
@martinusadyh
martinusadyh / smartctl-update.log
Created December 24, 2014 13:15
Output smartctl -xH
martinusadyh@martinusadyh:[~]$ sudo smartctl -H /dev/sdb6
[sudo] password for martinusadyh:
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
martinusadyh@martinusadyh:[~]$ sudo smartctl -x /dev/sdb6
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build)
@martinusadyh
martinusadyh / smartctl.log
Created December 23, 2014 13:19
SmartMonTools Log
$ sudo smartctl -a /dev/sdb
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 5400.6
Device Model: ST9500325AS
Serial Number: 5VEND3AM
LU WWN Device Id: 5 000c50 04510ebf8
Firmware Version: 0005HPM1
@martinusadyh
martinusadyh / disk_layout
Last active August 29, 2015 14:11
Disk Layout
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006980b
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 214843391 107420672 83 Linux
/dev/sda2 214845438 488396799 136775681 5 Extended
@martinusadyh
martinusadyh / dmesg.log
Created December 22, 2014 12:40
/var/log/dmesg
[ 1.827785] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.828450] sda: sda1 sda2 < sda5 sda6 >
[ 1.828991] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.831718] usb 1-1: New USB device found, idVendor=8087, idProduct=0024
[ 1.831719] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.831864] hub 1-1:1.0: USB hub found
[ 1.831967] hub 1-1:1.0: 6 ports detected
[ 1.943693] usb 2-1: new high-speed USB device number 2 using ehci-pci
[ 2.076051] usb 2-1: New USB device found, idVendor=8087, idProduct=0024
[ 2.076053] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
@martinusadyh
martinusadyh / backup-history.pl
Created December 12, 2014 12:59
Script Backup dengan History
# http://kb.masterweb.com/beta/index.cgi/read/Artikel:Backup_filesystem_dengan_histori_menggunakan_rsync
#!/usr/bin/perl -w
use strict;
use Cwd qw(abs_path);
use POSIX;
use Time::Local;