Skip to content

Instantly share code, notes, and snippets.

View pakMann's full-sized avatar

Arman Adhitama pakMann

  • independent
  • Cimahi, Indonesia
View GitHub Profile
@pakMann
pakMann / elasticsearch.conf
Created January 7, 2018 15:46 — forked from andrewvc/elasticsearch.conf
Upstart script for elasticsearch on ubuntu.... that actually works. Install the deb, and then run `sudo update-rc.d elasticsearch remove -f` to disable the init script.
# ElasticSearch upstart script
description "ElasticSearch service"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
@pakMann
pakMann / video_uploader.rb
Created July 10, 2016 23:26 — forked from jirikolarik/video_uploader.rb
CarrierWave FFmpeg Uploader example
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:
@pakMann
pakMann / ImageUploader
Created July 10, 2016 01:38 — forked from ahamid/ImageUploader
CarrierWave mixed content upload processing
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}"
@pakMann
pakMann / Checkbox and Radio mixin
Created May 15, 2016 21:12 — forked from b-ry/Checkbox and Radio mixin
Sass mixin for checkbox and radio replacement
//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;
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)