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
require 'net/imap' | |
imap = Net::IMAP.new('example.com') | |
imap.authenticate('LOGIN', '[email protected]', 'password') | |
imap.select('INBOX') | |
if not imap.list('INBOX', 'testfolder') | |
imap.create('INBOX.testfolder') | |
end | |
imap.expunge | |
imap.uid_search(["FROM", "[email protected]"]).each_with_index do |message_id, i| |
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 | |
urls=(\ | |
"https://aws.amazon.com/jp/ 200" \ | |
"https://aws.amazon.com/console/ 200" \ | |
"https://console.aws.amazon.com/ 302" \ | |
) | |
for (( i = 0; i < ${#urls[@]}; i++ )) | |
do |
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 System.Random | |
main = do | |
gen1 <- getStdGen | |
let rand = getRandom gen1 | |
print . showKiyoshi . getKiyoshi $ rand | |
text :: [String] | |
text = ["zun", "doko", "kiyoshi"] |
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 System.Random | |
import Control.Monad | |
main :: IO() | |
main = print showKiyoshi | |
getRandomInt :: IO Int | |
getRandomInt = getStdRandom $ randomR (0,1) :: IO Int | |
text :: [String] |
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
$ coqtop | |
Welcome to Coq 8.4pl4 (June 2014) | |
Coq < Definition proof0 : forall (P Q : Prop), ((P \/ Q) /\ ~P) -> Q. | |
1 subgoal | |
============================ | |
forall P Q : Prop, (P \/ Q) /\ ~ P -> Q | |
proof0 < intros. |
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
$ sudo apt-get install nginx | |
$ sudoedit /etc/apache2/apache2.conf /etc/apache2/ports.conf | |
#Listen 80 | |
Listen 8080 | |
$ sudo service apache2 restart | |
$ sudo service nginx start | |
$ sudo apt-get install php5-fpm php5-cgi | |
$ sudo service php5-fpm start | |
$ sudoedit /etc/nginx/sites-available/default |
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
$ cd /var/git | |
(a) | |
$ git clone --bare /var/www/html/project project.git | |
(b) | |
$ mkdir project.git ; sudo chown -R user:user project.git | |
$ cd project.git ; git init --bare | |
$ cd /var/www/html/project ; git push /var/git/project.git master | |
$ cd /var/git/project.git |
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
# Tomcat | |
``` | |
$ sudo apt-get install lamp-server^ | |
$ sudo apt-get install tomcat7 tomcat7-admin tomcat7-user | |
$ sudoedit /etc/default/tomcat7 | |
JAVA_HOME=/usr/lib/jvm/default-java | |
$ sudoedit /etc/tomcat7/tomcat-users.xml | |
<tomcat-users> | |
<user username="admin" password="pass" roles="manager-gui,admin-gui"/> |
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
"============================================================================= | |
" Description: UTF-8化と文字コード自動認識設定 | |
" http://www.kawaz.jp/pukiwiki/?vimを改変 | |
" Author: fuenor <[email protected]> | |
" http://sites.google.com/site/fudist/Home/vim-nihongo-ban/vim-utf8 | |
" Last Modified: 2011-03-06 13:03 | |
" Version: 1.18 | |
"============================================================================= | |
let s:MSWindows = has('win95') + has('win16') + has('win32') + has('win64') |
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
diff --git a/index.js b/index.js | |
index 0bcad82..6344b71 100755 | |
--- a/index.js | |
+++ b/index.js | |
@@ -51,7 +51,8 @@ function request(str, cb) { | |
method: 'POST', | |
headers: { | |
'Content-length': str.length, | |
- 'Content-Type': 'text/plain' | |
+ 'Content-Type': 'text/plain', |
NewerOlder