Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
On my way building something ...

Manda Putra mandaputtra

🚀
On my way building something ...
View GitHub Profile
View Stylus Boilerplate
//
// the stack that i use with stylus-lang
//
#nib || stylus mixin
https://github.com/stylus/nib
#rupture || stylus media queries
https://github.com/jescalan/rupture
View clickToSendWhatsapp.js
// https://api.whatsapp.com/send?phone=+{{ *YOURNUMBER* }}&text=%20{{ *YOUR MESSAGE* }}
var yourNumber = "{{ your number in string}}"
var yourMessage = "{{ your message in string }}"
// %20 mean space in link
// If you already had an array then you just join them with '%20'
// easy right
function getLinkWhastapp(number, message) {
@mandaputtra
mandaputtra / js-shortcut.md
Created Jan 7, 2019
Simple JavaScript shortcut
View js-shortcut.md

Eliminating all duplicates in array with reduce() reduce take 4 params previousValue, currentValue, index, array

array.reduce((acc, el, i, arr) => {
    if (arr.indexOf(el) !== i && acc.indexOf(el) < 0) acc.push(el); return acc;
}, []);
@mandaputtra
mandaputtra / vscodeext.md
Last active Jan 28, 2019
my vscode extension
View vscodeext.md

INSTALLING

code --install-extension <copy here and wait>

Copy this

ahmadawais.shades-of-purple

anseki.vscode-color
@mandaputtra
mandaputtra / index.html
Last active May 13, 2019
Canvas invert color in image
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./css/style.css">
<title>A Gamma Image Editor</title>
</head>
<body>
@mandaputtra
mandaputtra / README.md
Last active May 13, 2019
Javascript/Canvas - HTML5 articles links for image/video editing
View README.md
@mandaputtra
mandaputtra / .env.example
Last active Jul 3, 2019
A common .env for an app, cause I'm lazy
View .env.example
HOST=
PORT=
ENV=
REDIS_HOST=
REDIS_PORT=
DB_CLIENT=
DB_HOST=
DB_USER=
@mandaputtra
mandaputtra / campursari.md
Last active Jul 24, 2019
Campursari Playlist Youtube ID
View campursari.md

Because spotify doesn't had any good campursari & dangdut song

Campursari & Dangdut Playlist

WARNING: Only for truly Javanesse People, and beware most song can make you dance~

This Youtube ID mean to be played with Tizonia on terminal :

List

  • Supra Nada Gending Jawa - Kh76FxCW2Yk
@mandaputtra
mandaputtra / dev-server.js
Created Jul 17, 2019
Chokidar Usage Example
View dev-server.js
#!/usr/bin/env node
/* I found this code somewhere in the wild if someone could reference it I would happy
* I'm creating this because my google search cant find it! It will run index.js
* and watch files under folder src. Thanks. tell me if you found the source of this code
* I'm glad to mention it here.
*/
/* eslint-disable no-path-concat */
@mandaputtra
mandaputtra / README.md
Last active Oct 16, 2019
RFC: Cara kerja kompresi kecilin pada browser dan server
View README.md

RFC: Cara Kerja Kecilin Compression Service Pada Browser

Penjelasan secara teknikal cara kerja servis kompresi kecilin, baik pada browser maupun pada proses pada saat di server

Browser

Gambar berikut menjelaskan cara kerja browser extension :

gambar

Berikut langkah langkahnya :