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
@resarahadian
resarahadian / ClButtonTransparant.java
Created December 23, 2013 08:06
Membuat ComboBox Transparan
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.*;
@SuppressWarnings("serial")
@goFrendiAsgard
goFrendiAsgard / gomodorokanbanreminder.py
Last active March 4, 2017 14:03
Go Frendi's pomodoro, kanban, and reminder application. Work on terminal, written by using Python
#!/usr/bin/env python
'''
Kanban + Pomodoro + Reminder
If you use linux please install sox first (sudo apt-get install sox)
You can use these formats in order to remind you of the tasks:
* Y:m:d H:M:S
* Y:m:d H:M
* everyday H:M[:S]
* every [monday|tuesday|wednesday|thursday|friday|saturday] H:M[:S]
* *:m:d H:M[:S]
@jhamrick
jhamrick / demise_of_for_loops.py
Created April 5, 2013 17:08
Script demonstrating speed differences between NumPy and native Python for loops.
from timeit import Timer
import numpy as np
import math
def timer(*funcs):
# find the maximum function name length
if len(funcs) > 1:
maxlen = max(*[len(func) for func in funcs])
elif len(funcs) == 1:
maxlen = len(funcs[0])
@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
@cebe
cebe / BaseController.php
Created October 25, 2014 19:41
Yii2 API Auth with username and password
<?php
/**
*
*
* @author Carsten Brandt <mail@cebe.cc>
*/
namespace api\components;
use common\models\ApiSystem;
@brokendish
brokendish / command_exec.py
Created February 26, 2012 08:58
python-GUI
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
import os
import Tkinter as Tk
import commands as com
import ScrolledText as St
import tkFileDialog as dlg
import tkMessageBox as msb
@RobinCPC
RobinCPC / ctag_vim_in_Windows.markdown
Last active August 4, 2022 10:04
How to use vim with ctags (tagbar plugin) in wondows systems

Frist, need to have vim and install tagbar plugin in windows system.

  • Simplely, I install git and use git bash with vim.
  • Construct vim setting in HOME directory (~/.vimrc).
	Could use `$ echo $HOME` to find out HOME directory set by git.

Second, add ctags in PATH which could find by git bash.

  • Download ctags.zip (pre-complied binary file inside) from ctags website.
  • Put ctags.exe in a directory, whose execution path is recognized in Windows (for me: GIT_DIR/usr/bin/).
@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
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@buhman
buhman / 00 wpa_cli passphrase network
Last active March 8, 2023 21:51
all wpa_cli ommands can be tab-completed
localhost ~ # cat <<EOF> /etc/wpa_supplicant.conf
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel
update_config=1
EOF
localhost ~ # wpa_supplicant -iwlp1s0 -Dnl80211 -c/etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
localhost ~ # wpa_cli
wpa_cli v2.0
Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi> and contributors