Skip to content

Instantly share code, notes, and snippets.

View notalentgeek's full-sized avatar

Mikael Kristyawicaksono notalentgeek

View GitHub Profile
@notalentgeek
notalentgeek / note_fm.py
Last active December 20, 2016 00:19
My Python codes to automate my markdown notes.
import copy
import datetime as dt
import os
import shutil
import subprocess
import sys
import time
def main(args):
@notalentgeek
notalentgeek / see_fm.py
Last active December 25, 2016 20:14
Python automation script for managing my personal "see" folder.
from os import listdir
from os.path import isfile, join
from tzlocal import get_localzone
import datetime as dt
import os
import shutil
import sys
# Constants.
# Constant for a backup folder name.
@notalentgeek
notalentgeek / timer_second_change.py
Last active December 12, 2016 16:55
Python class to help to execute code for every second passed.
import datetime as dt
# This is a class to detect change in second.
# My first initial idea was to make a codes
# those execute for every second passed.
# The method here is to take the current time
# from datetime.datetime.now().time(), extract
# the second and then execute something when
# the value changes (most of the time codes
# will be executed for every one second).
@notalentgeek
notalentgeek / AlphaColorChangeFunction.pde
Created December 8, 2016 11:11
A Processing function to change color's opacity.
public color ChangeAlpha(
color _color,
int _desiredAlpha
){ return _color & ~#000000 | (_desiredAlpha << 030); }
@notalentgeek
notalentgeek / AlphaColorChange.pde
Last active December 8, 2016 10:51
Processing sketch to change alpha of a color programmatically.
color alphaColor;
// I test this program using red color.
// But you can use any color you want.
color mainColor = color(255, 0, 0);
// The least alpha value is 0 while
// the most alpha value is 255.
// This variable is the starting alpha
// value.
int alphaValue = 255;