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
use (groovy.time.TimeCategory) { | |
def today = new Date() | |
return (0..2).collect { i -> (today - i.days).format('YYYYMMdd') } | |
} |
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
let blacklists = ["https://mail.google.com/*", "*://*.reddit.com/*", "*://feedly.com/*"] | |
unmap <C-h> "The unmaps the default 'C-h' mapping |
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; -*- | |
u""" | |
IP から GeoIP を利用して日本の都道府県名を引く | |
:Author: t.hamamoto@skillupjapan.co.jp | |
* http://koshigoeb.hateblo.jp/entry/2012/02/19/183631 | |
* http://www.maxmind.com/app/city | |
* http://www.maxmind.com/app/fips10_4 |
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
#!/usr/bin/perl | |
# | |
# mysqldump -routines --no-create-info --no-data --no-create-db --compact | perl $0 | |
use strict; | |
use warnings; | |
use utf8; | |
my $output_dir = "out"; |
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
var d = openDatabase("K4W", "", "Kindle Cloud Reader", 5E6); | |
d.readTransaction(function(t) { | |
t.executeSql("SELECT * FROM bookdata", | |
[], | |
function(t, r) { | |
console.log(r.rows); | |
}); | |
}); |
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
# see: https://github.com/ansible/ansible/issues/10294#issuecomment-147833468 | |
import ssl | |
if hasattr(ssl, '_create_default_https_context') and hasattr(ssl, '_create_unverified_context'): | |
ssl._create_default_https_context = ssl._create_unverified_context | |
class CallbackModule(object): | |
pass |
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 action from selected at per line, to temporary project. *) | |
on run {input, parameters} | |
set theRawLines to my getRawLines(input as string) | |
if not length of theRawLines is greater than 0 then return input | |
set theTrimmedLines to my getTrimmedLines(theRawLines) | |
if not length of theTrimmedLines is greater than 0 then return input | |
tell application "OmniFocus" | |
tell default document |
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
alias show-ssl-cert='openssl s_client -connect $1:443 -showcerts' |
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 | |
set -eu | |
IQOSPHERE_DOMAIN="https://iqosphere.jp" | |
IQOSPHERE_LOGIN_API="${IQOSPHERE_DOMAIN}/modules/login" | |
IQOSPHERE_REGISTER_API="${IQOSPHERE_DOMAIN}/modules/awardpoint" | |
LOGIN_ID="${YOUR_LOGIN_ID}" | |
PASSWORD="${YOUR_LOGIN_PASSWORD}" | |
PACKCODE=$1 |
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
'use strict' | |
const cashGoal = 10000 * 10000; | |
const wageEffects = { shikaku: 1.5, programming: 20 }; | |
const esteemItems = ['shikaku', 'programming']; | |
const wage = (items, effects) => | |
2 | |
+ (items.shikaku * effects.shikaku) | |
+ (items.programming * effects.programming); |