This file contains 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 | |
function usage { | |
cat <<EOF | |
$(basename ${0}) is a tool for Change a Screen Brightness(Verification environment : Debian7) | |
Usage: | |
$(basename ${0}) [command or options] | |
Command(Selected Brightness): |
This file contains 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
<!-- | |
# This RSS and ATOM has been generated by Pelican | |
# Pelican is a static site generator, written in Python. Highlights include: | |
http://docs.getpelican.com/en/3.6.3/ | |
--> | |
<!-- ATOM Feed --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom"><title>Brewing Heads</title><link href="http://shinshin86.github.io/BrewingHeads/" rel="alternate"></link><link href="http://shinshin86.github.io/BrewingHeads/feeds/all.atom.xml" rel="self"></link><id>http://shinshin86.github.io/BrewingHeads/</id><updated>2016-03-06T00:00:00+09:00</updated><entry><title>BrewingHeads</title><link href="http://shinshin86.github.io/BrewingHeads/brewingheads.html" rel="alternate"></link><updated>2016-03-06T00:00:00+09:00</updated><author><name>shinshin86</name></author><id>tag:shinshin86.github.io,2016-03-06:BrewingHeads/brewingheads.html</id><summary type="html"><h1>Episode 0</h1> |
This file contains 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
# -*- coding: utf-8 -*- | |
import sys | |
def create_dict(c,p): | |
dic ={} | |
for i in range(len(c)): | |
dic[c[i]] = p[i] | |
return dic | |
def q_replace(q, dic2): |
This file contains 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.io.BufferedInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipOutputStream; |
This file contains 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.Random; | |
public class PasswordGenerate { | |
/** | |
* Password generate | |
* | |
* @param passLength | |
* Password length | |
* @return |
This file contains 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
# Please use "copy and paste" at Your Python environment. | |
# I have been tested with Python3. | |
# Hello World | |
python -c "print('Hello World')" | |
# Create Files(Example: Create a 10 pcs "text" file) | |
python -c "import random;[open(str(random.randint(1, 100000)) +'.txt', 'w').close() for i in list(range(10))]" | |
# Rename a all file name in the directory("jpg"file) |
This file contains 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
# -*-coding: utf-8-*- | |
import glob | |
import os | |
from PIL import Image; | |
# Get all of the image files that exist under the "work" directory. | |
file_list = [r.split('/')[-1] for r in glob.glob('./work/*')] | |
for f in file_list: | |
file_extension = os.path.splitext(f) | |
target_file_extension = [".jpeg", ".jpe", ".jpg", ".JPEG",".png",".PNG",".gif",".GIF",".bmp",".BMP"] |
This file contains 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
# setup_for_ubuntu_devmachine | |
#==================================================================== | |
# Basic setting | |
#==================================================================== | |
sudo apt-get update -y && sudo apt-get upgrade -y && | |
env LANGUAGE=C LC_MESSAGES=C xdg-user-dirs-gtk-update |
This file contains 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
// Usage: | |
// cf {color} {text} | |
// colors => black, red, green, yellow, blue, magenta, cyan, white | |
package main | |
import ( | |
"fmt" | |
"flag" | |
) |
This file contains 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
// Posting anonymously botn sample | |
// Confirm whether to submit a post => yes / no | |
controller.hears(['anonypost (.*)'], ['direct_message','direct_mention','mention'], function(bot,message) { | |
var matches = message.text.match(/anonypost (.*)/i); | |
var anonypost = matches[1]; | |
bot.reply(message, 'I will post this content anonymously. Is it OK? => ' + anonypost ); | |
bot.startConversation(message, function(err, convo) { | |
convo.ask('yes / no', | |
[ | |
{ |
OlderNewer