Skip to content

Instantly share code, notes, and snippets.

View jyt2015's full-sized avatar

jyt2015

  • 中国N/A
View GitHub Profile
@jyt2015
jyt2015 / post.hbs
Created October 15, 2015 21:54 — forked from frantzypants/post.hbs
Casper post.hbs with Discourse embed code
{{!< default}}
{{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }}
{{! Everything inside the #post tags pulls data from the post }}
{{#post}}
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
anonymous
anonymous / config.json
Created October 15, 2015 19:44
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
anonymous
anonymous / config.json
Created October 15, 2015 19:44
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@jahyunpark
jahyunpark / Wear_MTBF_151012_10_12_2015_1503.log
Created October 15, 2015 19:33
Wear_MTBF_151012_10_12_2015_1503_LOGFILE
{"time":"2015-10-12T15:05:15-0700","log":"mainLoop::0::recentCall"}
{"time":"2015-10-12T15:05:15-0700","log":"05_01_01_03_Telephony::Start::recentCall::0"}
{"time":"2015-10-12T15:06:02-0700","log":"05_01_01_03_Telephony::Stop::Pass"}
{"time":"2015-10-12T15:06:09-0700","log":"05_01_01_03_Telephony::Start::recentCall::1"}
{"time":"2015-10-12T15:06:55-0700","log":"05_01_01_03_Telephony::Stop::Pass"}
{"time":"2015-10-12T15:07:02-0700","log":"05_01_01_03_Telephony::Start::recentCall::2"}
{"time":"2015-10-12T15:07:47-0700","log":"05_01_01_03_Telephony::Stop::Pass"}
{"time":"2015-10-12T15:07:54-0700","log":"05_01_01_03_Telephony::Start::recentCall::3"}
{"time":"2015-10-12T15:08:39-0700","log":"05_01_01_03_Telephony::Stop::Pass"}
{"time":"2015-10-12T15:08:46-0700","log":"05_01_01_03_Telephony::Start::recentCall::4"}
@naw
naw / has_many_through.rb
Created October 15, 2015 19:33
has_many_through nested_attributes setter vs collection setter
# This is not a bug report
#
# The purpose of this file is to illustrate
# differences in how Rails treats assignment
# to a nested_attributes setter vs. assignment
# to a collection directly.
#
# In the former, existing records are _not_ deleted if they are not present in the assigned data.
# In the latter, existing records _are_ deleted if they are not present in the assigned data.
[deploy@ip-10-157-104-54 current]$ RAILS_ENV=production bundle exec script/import -t text -p /opt/sample-data/DCE_WU_content_model/ -v open -a lew
Loading environment
Import Text records using metadata files in: /opt/sample-data/DCE_WU_content_model/
Starting import
19:18:11 Parsing lew1880.0001.007.xml
19:18:12 attaching file: helm_01_0001_bln.tif
19:18:15 attaching file: helm_01_0002_ttl.tif
19:18:19 attaching file: helm_01_0003_unm.tif
19:18:25 attaching file: helm_01_0004_unm.tif
@charlotteabrams
charlotteabrams / Charlotte Abrams Resume.md
Last active March 9, 2016 05:19
Charlotte Abrams ADA Developers Resume

Charlotte Abrams

6209 106th Ave NE Kirkland, Washington 98033

Education

Bachelor of Arts in Mathematics— GPA 3.5, Willamette University—Salem, Oregon, May 2014

+-----------------------------------------------------------------------------------------------------+
| name | bits | bytes | min | actual min value | max | actual max value |
|---------+--------+--------+-------+----------------------------+--------+---------------------------|
| boolean | 1-bit | -- | false | | true | |
| byte | 8-bit | 1-byte | -2^7 | -128 | 2^7-1 | 127 |
| short | 16-bit | 2-byte | -2^15 | -32'768 | 2^15-1 | 32'767 |
| char | 16-bit | 2-byte | 0 | '\u0000' | 2^16-1 | '\uffff' (65535) |
| int | 32-bit | 4-byte | -2^31 | -2'147'483'648 | 2^31-1 | 2'147'483'647 |
| long | 64-bit | 8-byte | -2^63 | -9'223'372'036'854'775'808 | 2^63-1 | 9'223'372'036'854'775'807 |
| float | 32-bit | 4-byte | +/- -3.4028235 * 10^38 | +/- 3.4028235 * 10^38
@vkGiot
vkGiot / bsAutumn.css
Created October 15, 2015 19:23
[Stylish] Autumn Theme for bs.to
/* @start GENERAL */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic);
*, *:before, *:after{
font-family: "Open Sans", Arial, sans-serif;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
html, body{
color: #444;
@mkokes
mkokes / max-child-php5-fpm.sh
Created October 15, 2015 19:23
Calculate max number of php5-fpm processes
echo "pm.max_children = $(( $(awk '/MemTotal:/ { printf "%d\n", ($2*0.80) }' /proc/meminfo) / $(ps --no-headers -o "rss,cmd" -C php5-fpm | awk '{ sum+=$1 } END { printf ("%d\n", sum/NR) }') ))"