Skip to content

Instantly share code, notes, and snippets.

@lonsagisawa
lonsagisawa / default.html
Created December 8, 2013 17:01
カラム構成のサンプル(Bootstrap)
<div class="container">
<div class="row">
<div class="col-md-8">{{ content }}</div>
<div class="col-md-4">
<div class="row">
<div class="col-md-12 col-sm-4">
[righttop in desktop]<br>
[leftbottom in tablet]<br>
[bottomtop in smartphone]<br>
</div>
@lonsagisawa
lonsagisawa / _config.yml
Created December 9, 2013 12:51
pagination setting
paginate: 5
paginate_path: "page:num"
@lonsagisawa
lonsagisawa / index.html
Created December 9, 2013 12:52
pagination setting(template,html)
<ul class="pager">
{% if paginator.previous_page != nil %}
<li class="previous"><a href="{{ paginator.previous_page_path }}">&larr; 新しい記事</a></li>
{% else %}
{% if paginator.next_page != 2 %}
<li class="previous"><a href="/">&larr; 新しい記事</a></li>
{% endif %}
{% endif %}
{% if paginator.next_page != nil %}
<li class="next"><a href="{{ paginator.next_page_path }}">古い記事 &rarr;</a></li>
@lonsagisawa
lonsagisawa / screenshot_active.sh
Last active June 30, 2018 05:25
ImageMagickでスクリーンショットを撮り、libnofityで通知させる
#!/bin/sh
# アクティブなウィンドウのスクリーンショットを撮り、通知する
# 12 Mar 2014: dateコマンドの辺りで間抜けな間違いをしていたので修正
activeWinLine=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)")
activeWinId=${activeWinLine:40}
exec import -window "$activeWinId" -frame $HOME/Pictures/screenshot/$(date +%y%m%d_%H%M%S).png &
exec notify-send 'Screenshot Taken' $HOME/Pictures/screenshot/$(date +%y%m%d_%H%M%S).png &
@lonsagisawa
lonsagisawa / gtk.css
Created May 8, 2014 15:36
~/.config/gtk-3.0/gtk.css: Disabling CSD Shadows (https://github.com/baskerville/bspwm/issues/133)
.window-frame, .window-frame:backdrop {
box-shadow: 0 0 0 black;
border-style: none;
margin: 0;
border-radius: 0;
}
.titlebar {
border-radius: 0;
}
@lonsagisawa
lonsagisawa / compton.sh
Last active August 29, 2015 14:01
comptonの起動オプション(パフォーマンスまわりの設定は省略)
#!/bin/sh
exec compton -cCzG -t-3 -l-5 -r4 \
--config /dev/null --backend glx \
--vsync opengl-swc \
--shadow-exclude "name = 'notify-osd'" \
--shadow-exclude "_GTK_FRAME_EXTENTS@:c" \
--shadow-ignore-shaped &
body {
background-color: #eee;
font-family: "Roboto", "Lucida Grande", "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", "IPAexGothic", sans-serif;
}
h1, h2, h3 {
font-family: "Roboto Condensed", "Hiragino Kaku Gothic ProN", "Meiryo", "IPAexGothic", sans-serif;
font-weight: 300;
}
@lonsagisawa
lonsagisawa / 50-synaptics.conf
Last active November 18, 2017 09:28
/etc/X11/xorg.conf.d/50-synaptics.conf (For CF-N10)
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
Driver "synaptics"
Option "AccelerationNumerator" "1"
Option "AccelerationDenominator" "2"
Option "AccelerationThreshold" "2"
Option "TapButton1" "0"
Option "VertEdgeScroll" "off"
Option "HorizEdgeScroll" "off"
@lonsagisawa
lonsagisawa / 20-intel.conf
Created June 17, 2017 08:52
Modern X.org configuration for Intel HD Graphics: modesettings driver
Section "Device"
Identifier "Intel IGP"
Driver "modesetting"
Option "AccelMethod" "glamor"
EndSection
@lonsagisawa
lonsagisawa / 30-touchpad.conf
Last active November 22, 2017 11:19
libinput X.org config for ThinkPad X240 clickpad, place this in /etc/X11/xorg.conf.d/
Section "InputClass"
Identifier "UltraNav"
Driver "libinput"
MatchIsTouchpad "on"
Option "ClickMethod" "clickfinger"
Option "NaturalScrolling" "on"
Option "Tapping" "off"
EndSection