Skip to content

Instantly share code, notes, and snippets.

View evanhutomo's full-sized avatar
🐢
be like snapping turtle, they have armor to hide, jaw to attack

Evan Hutomo evanhutomo

🐢
be like snapping turtle, they have armor to hide, jaw to attack
  • Japan - Indonesia
View GitHub Profile
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
@evanhutomo
evanhutomo / vimrc
Last active October 7, 2022 12:37
" Set compatibility to Vim only.
set nocompatible
" Helps force plug-ins to load correctly when it is turned back on below.
filetype off
" Turn on syntax highlighting.
syntax on
syntax enable
# pass data from 1 window parent to child window
from tkinter import *
class trackApp(Frame):
def __init__(self, master):
Frame.__init__(self, master)
@evanhutomo
evanhutomo / gitignore-note
Created September 28, 2015 03:09
gitignore
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@evanhutomo
evanhutomo / gradle_eh
Last active August 29, 2015 14:23
personal cheatsheet for memorizing purpose of gradle command
## check and download gradle from gradle-wrapper.properties
./gradlew -v
## fire a spesific gradle command (you can see the gradle tab on right the right side - default). For instance, assemble command
./gradlev assemble
@evanhutomo
evanhutomo / qjs
Created April 8, 2015 06:34
ELOQUENT JAVASCRIPT exercise - The sum of a range
(function () {
/*
console.log(sum(range(1, 10)));
-> 55
console.log(range(5, 2, -1));
-> [5,4,3,2]
*/
function range (param1, param2, param3) {
/*
1. if param1 >= param2 then -param3 else return false
@evanhutomo
evanhutomo / npm
Last active August 29, 2015 14:17
npm useful command (for reminder purpose)
#print list of global installed libraries
npm list -g
#write .bash_profile with NODE_PATH (npm root -g) -> point to node_modules
echo 'export NODE_PATH="'$(npm root -g)'"' >> ~/.bash_profile && . ~/.bash_profile
#write .bash_profile with NODE_PATH GLOBAL
echo 'export NODE_PATH="'$(npm bin -g)'"' >> ~/.bash_profile && . ~/.bash_profile
@evanhutomo
evanhutomo / shell
Last active February 8, 2018 03:58
bash note for personal use
# fix MAMP common issue, myslq wont start but apache is start
killall -9 mysqld
# check bash type
/usr/bin/printenv
# node and npm path, write on .bash_profile
echo 'export PATH=$PATH:/usr/local/bin' >> $HOME/.bash_profile
# uninstall npm package
@evanhutomo
evanhutomo / phase1.js
Last active August 29, 2015 14:17
phase 1 : Learn javascript module pattern
/*
Courtesy of addyosmani
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#modulepatternjavascript
*/
// Counter covers namespace
var Counter = (function(){
//count covers private var
var count = 0;
//count covers private method
var privateMethod;
@evanhutomo
evanhutomo / evlog.js
Created March 1, 2015 13:57
Just tried to subtitute console.log object with mine. This still first snippet version, so any suggestion, good critics, idea will be good and be heared :D. Thanks
var evLog = {
d: function(param){
var bCheck = $('body').children('#playground').length;
if(bCheck == 0){
console.log("playground not found");
var createDiv = document.createElement("div");
createDiv.setAttribute("id", "playground");
document.body.appendChild(createDiv);
}