Skip to content

Instantly share code, notes, and snippets.

QMK Firmware 0.5.169
WARNING:
Some git sub-modules are out of date or modified, please consider runnning:
make git-submodule
You can ignore this warning if you are not compiling any ChibiOS keyboards,
or if you have modified the ChibiOS libraries yourself.
Making meishi with keymap default and target avrdude
avr-gcc (GCC) 5.4.0
@kngrow
kngrow / commit.rb
Created May 15, 2017 08:54
ブランチ名からコミットメッセージの上書きする奴の改良版
#!/usr/bin/env ruby
#今いるブランチ名を取得
current_branch = `git branch | grep '*'`.chomp.sub('* ', '')
# issue番号があるなしでコミットメッセージにissue番号を付与するかきめる
if current_branch.include?('feature/issue') then
current_branch = current_branch.delete('feature/issue')
today=`date -v-1d +%F`
echo $today
# git log --after=2016-04-07 --numstat --pretty="%H" | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
git log --after=$today --numstat --pretty="%H" | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
# git log --numstat --pretty="%H" | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
# encoding: utf-8
require 'exifr'
require 'fileutils'
require 'date'
p 'パスを入力してください'
dir = STDIN.gets.chomp
photo_dir = './' + dir + '/*.JPG'
# encoding: utf-8
i = 10_000
puts "入力値 : (入力値 / 100,000 ) × 100"
while i <= 100_000
ans = ( i/ 100_000.0) * 100
puts " #{i} : #{ans}"
i += 1_000
end
<ul class="example-orbit" data-orbit data-options="bullets:false; slide-number:false; ">
<?php
for($i = 1 ;$i < 7 ; $i++ ){
if($cfs->get('image' . $i , $post->ID)){ ?>
<li data-orbit-slide="slide<?php echo $i ; ?>">
<img src="<?php echo $cfs->get('image'.$i,$post->ID);?>" alt="slide" />
</li>
<?php }} ?>
</ul>
<ul class="small-block-grid-4"><!--サムネイル-->
<?php
//仕事での休憩時間を引き算するコード的な奴
$work = strtotime("23:23") - strtotime("00:00");//00:00〜23:23まで働くとする(鬼シフト
$rest = strtotime("13:00") - strtotime("12:00");//12時から一時間休憩
$rest2 = strtotime("19:00") - strtotime("15:00");//15時から4時間休憩
$day_rest = date('H:i:s',($rest + $rest2));//総合休憩時間
$day_work = date('H:i:s',($work - $day_rest)); //総合働いた時間
$(function(){
$("#theplaceyouwant").instastream({
instaToken: 'Your Instagram Token here',
instaUser: 'Your Instagram User ID here',
instaResults: 3,
instaMenu: 'yes'
});
});