Skip to content

Instantly share code, notes, and snippets.

View theoyrus's full-sized avatar
🎯
Focusing

Suryo Prasetyo W theoyrus

🎯
Focusing
View GitHub Profile
@theoyrus
theoyrus / cek-node_modules.md
Created March 22, 2022 16:20
Cara cepat cek size node_modules di Linux/Mac

Cara cepat cek size node_modules di Linux/Mac

Mungkin ada kalanya kita butuh mengecek berapa size node_modules yang terpasang di project-project kita. Jika kita seperti kebanyakan js dev, kita sering menjalankan npm install atau yarn. Nah pasti, kita mungkin memiliki banyak direktori node_modules dari proyek lama yang tidak terpakai lagi.

Si folder node_modules ini sudah gak relevan lagi, dan malah membuat hard drive kita membengkak, hampir habis, atau membuat komputer lola >:( Tenang kawand. Berikut ini cara mengetahui dengan tepat berapa banyak direktori node_modules yang telah kita instal di komputer (Mac, Linux) serta berapa banyak space yang digunakan secara individual dan totalnya.

Cari semua si biang kerok node_modules >:(

Masuk ke direktori mana kita mau mencari si biang kerok ini, misal saya ada di folder ~/devel.

@theoyrus
theoyrus / sitemap.js
Last active March 10, 2018 21:18
Blogger Sitemap generator
var postTitle=new Array();var postUrl=new Array();var postData=new Array();var postDate=new Array();var postLabels=new Array();var postBaru=new Array();var sortBy="titleasc";var tocLoaded=false;var numChars=250;var postFilter="";var numberfeed=0;function loadtoc(a){function b(){if("entry" in a.feed){var d=a.feed.entry.length;numberfeed=d;ii=0;for(var h=0;h<d;h++){var n=a.feed.entry[h];var e=n.title.$t;var m=n.published.$t.substring(0,10);var j;for(var g=0;g<n.link.length;g++){if(n.link[g].rel=="alternate"){j=n.link[g].href;break}}var o="";for(var g=0;g<n.link.length;g++){if(n.link[g].rel=="enclosure"){o=n.link[g].href;break}}var c="";if("category" in n){for(var g=0;g<n.category.length;g++){c=n.category[g].term;var f=c.lastIndexOf(";");if(f!=-1){c=c.substring(0,f)}postLabels[ii]=c;postTitle[ii]=e;postDate[ii]=m;postUrl[ii]=j;postData[ii]=o;if(h<10){postBaru[ii]=true}else{postBaru[ii]=false}ii=ii+1}}}}}b();sortBy="titleasc";sortPosts(sortBy);sortlabel();tocLoaded=true;displayToc2();document.write('</br>')}funct
import java.io.*;
public class Stack_String
{
int maxsize;
String [] stackarray;
int top;
public void inisiasi (int s)
{
maxsize =s;
import java.lang.Math;
import java.util.Scanner;
public class PemrogramanStatistika{
public int gaji;
public Scanner masuk1 = new Scanner (System.in);
public Scanner masuk2 = new Scanner (System.in);
public Scanner masuk3 = new Scanner (System.in);
public static void main (String[] args){
String jawaban = "ya" ;
import java.io.*;
public class Queue{
public int maxsize;
public double[] queuearray;
public int front;
public int rear;
public int jumlah;
public void inisiasi(int s) {
maxsize = s;
import java.io.*;
public class QueueString{
public int maxsize;
public String[] queuearray;
public int front;
public int rear;
public int jumlah;
public void inisiasi(int s) {
maxsize = s;
import java.util.Scanner;
class BinerSearchInputString
{
public int pencarianBiner(String b[], String kunciPencarian, int low, int high) {
int i, middle;
while(low <= high) {
middle = (low+high)/2;
if(kunciPencarian.equals( b[middle] ) )
return middle;
else if(kunciPencarian.compareTo( b[middle] ) < 0 )
@theoyrus
theoyrus / OperasiArray.java
Created March 21, 2017 13:22
Tugas SDT 2, Operasi Array
import java.util.Scanner;
class OperasiArray {
Scanner masukan = new Scanner(System.in);
public void masukdata (float data[][]) {
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
System.out.print("(" + (i + 1) + " . " + (j + 1) + ") :");
data[i][j] = masukan.nextFloat();
}
}
@theoyrus
theoyrus / NilaiKelas.java
Created March 21, 2017 12:34
Tugas SDT 1
import java.util.Scanner;
class NilaiKelas {
public static void main(String[] args) {
Scanner masuk = new Scanner(System.in);
Scanner masuknama = new Scanner(System.in);
Scanner masuknilai = new Scanner(System.in);
System.out.print("Masukkan jumlah data Mahasiswa yang akan dientri: ");
int jumlah = masuk.nextInt();