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
| # ElasticSearch upstart script | |
| description "ElasticSearch service" | |
| start on (net-device-up | |
| and local-filesystems | |
| and runlevel [2345]) | |
| stop on runlevel [016] |
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
| class VideoUploader < CarrierWave::Uploader::Base | |
| include ::CarrierWave::Backgrounder::Delay | |
| include CarrierWave::FFmpeg | |
| RESOLUTIONS = [ | |
| { version: :p1080, resolution: '1920x1080'}, | |
| { version: :p720, resolution: '1280x720'} | |
| ] | |
| # Choose what kind of storage to use for this uploader: |
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 'carrierwave/processing/mini_magick' | |
| class ImageUploader < CarrierWave::Uploader::Base | |
| include CarrierWave::MiniMagick | |
| IMAGE_EXTENSIONS = %w(jpg jpeg gif png) | |
| DOCUMENT_EXTENSIONS = %w(exe pdf doc docm xls) | |
| def store_dir | |
| "files/#{model.id}" |
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
| //Checkbox icon replacement | |
| //$cb-icon = calss name of icon | |
| //$cb-icon-checked = class name for checked icon | |
| @mixin checkbox ($cb-icon, $cb-icon-checked) { | |
| %checked { | |
| @extend %icon; | |
| @extend .#{$cb-icon-checked}:before; | |
| text-align: center; |
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
| /path/to/log/*.log { | |
| daily | |
| missingok | |
| rotate 14 | |
| compress | |
| delaycompress | |
| notifempty | |
| copytruncate | |
| su [user] [group] | |
| } |
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
| class Pacar | |
| #buat dulu pacar nya | |
| def initialize | |
| @pacar = ['Dian','Putri','Yasmin','Rena'] #<~ nama calon pacarnya | |
| @tipe = ['lucu','cantik','imut','ngegemesin'] #<~ tipe nya | |
| @gaada = "! eh ga jadi ternyata gapunya :(" #<~ kalo gapunya... | |
| end | |
| # Aku pengen cari pacar... | |
| def cari_pacar(target = nil) |
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
| for i in $(git branch | sed 's/^.//'); do git checkout $i; git pull --rebase origin master; done |
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
| // ---- | |
| // Sass (v3.3.5) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| @for $i from 1 through 3 { | |
| .parent-#{$i} { | |
| .child { | |
| margin: 10px * $i, (10px * $i) + 10; | |
| } |
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
| background: #f06; | |
| background: linear-gradient(45deg, orangered, yellow); | |
| min-height: 100%; |
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
| $topContent = $("#homepage") | |
| $nav = $(".navbar") | |
| navHeight = $nav.outerHeight(false) | |
| stickyNav = -> | |
| browserHeight = $(window).height() | |
| navTopPos = browserHeight - navHeight | |
| $topContent.css height: navTopPos | |
| scrollTop = $(window).scrollTop() | |
| if scrollTop > navTopPos | |
| $nav.css |