- clone this project by
git clone https://gist.github.com/717f75e6b87606940017adf385274044.git color
- run
cd color
- write the code as what you want
- color_constants.sh - new version of constant (using
tput
) - color_raw_constants.sh - old version of constant (using raw text to assign)
- some terminal app, might miss the color.
- install.sh - install color script
- color_constants.sh - new version of constant (using
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* timer/stopwatch object that for measure elapsed time running in java. | |
* <p> | |
* Contains | |
* <ol> | |
* <li>parse timer api: {@link #MStoS(long)} or {@link #NStoS(long)}</li> | |
* <li>Error message: {@link #getError()} or {@link #getErrors()}</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The checker to check string can or can't change to number. | |
* | |
* @author kamontat | |
* @version 1.0 | |
* @since Mon 06/Mar/2017 - 7:39 PM | |
*/ | |
public class Checker { | |
/** | |
* check input string must contains digit and <b>dot</b> ONLY. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package code.test; | |
import java.io.*; | |
import java.nio.file.Paths; | |
import java.util.*; | |
import java.util.jar.JarEntry; | |
import java.util.jar.JarFile; | |
/** | |
* To Extract jar file into normal file (System file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<!-- Latest compiled and minified CSS --> | |
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' integrity='sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u' crossorigin='anonymous'> | |
<!-- Optional theme --> | |
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css' integrity='sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp' crossorigin='anonymous'> | |
<!-- jquery of google CDN --> | |
<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.view.gui.lib; | |
import java.awt.*; | |
/** | |
* utilities with dimension and screen display. | |
* | |
* @author kamontat | |
* @version 1.3 | |
* @since 1/30/2017 AD - 1:47 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
on CD_to(theDir) | |
set go_dir to "cd " & theDir & " && clear" | |
-- check running name in `activity Monitor` this must matching. | |
set isRunning to is_running("iTerm2") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# go to current directory | |
cd "$(dirname "$0")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INPUT=false | |
ACTION="" | |
CODE="" | |
while getopts 'iD:E:h' flag; do | |
case "${flag}" in | |
i) INPUT=true ;; | |
D) ACTION="D" && CODE="$OPTARG" ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make sure that you give permission to this file | |
# run chmod 755 atom-plugin.sh | |
# or chmod +x atom-plugin.sh | |
# ----------------------------------------- | |
# command setting | |
if ! command -v apm >/dev/null 2>&1 && ! command -v apm-beta >/dev/null 2>&1; then | |
echo "you don't have commandline interface, install it!" |
OlderNewer