Skip to content

Instantly share code, notes, and snippets.

@syahrasi
syahrasi / kode_pos.php
Created March 22, 2018 09:38 — forked from bachors/kode_pos.php
Membuat API kode POS Indonesia
<?php
/* Just 4 Fun
API kode POS Indonesia
by iBacor.com */
function kode_pos($q){
// array untuk output
$result = array();
@syahrasi
syahrasi / dos2unix.md
Created January 17, 2017 04:14 — forked from umidjons/dos2unix.md
Execute dos2unix for directory recursively.

Will recursively find all files inside current directory and call for these files dos2unix command. Would break if you had spaces in file name.

find . -type f -exec dos2unix {} \;

Wouldn't break if you had spaces in file names.

find . -type f -print0 | xargs -0 dos2unix

Dokumentasi API dan contoh

0. Push Product (Add force as optional parameter )

HTTP Request

PATCH https://api.bukalapak.com/v2/products/:id/push.json

Parameters

@syahrasi
syahrasi / gulpfile.js
Last active August 29, 2015 14:17 — forked from andrewdc/gulpfile.js
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
rubysass = require('gulp-ruby-sass'),
fileinclude = require('gulp-file-include'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
livereload = require('gulp-livereload'),
lr = require('tiny-lr'),
connect = require('gulp-connect'),
@syahrasi
syahrasi / task.thor
Created January 23, 2014 00:25 — forked from stravid/task.thor
desc "deploy", "deploys the site via LFTP to the location specified in the environment"
def deploy
load_ftp_configuration
start_timestamp = Time.now.to_i
if system("lftp -e 'mirror -R -v #{ENV['PUBLIC_DIRECTORY']} #{ENV['FTP_TARGET_DIRECTORY']}; bye' -u #{ENV['FTP_USER']},#{ENV['FTP_PASSWORD']} #{ENV['FTP_SERVER']}")
puts "Deploy finished. (Duration: #{Time.now.to_i - start_timestamp} seconds)"
else
puts 'Deploy aborted, something went wrong.'
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@syahrasi
syahrasi / Gemfile
Created January 2, 2014 06:36 — forked from tuomasj/Gemfile
Sinatra Setup w/ Rack-livereload and Guard
source "https://rubygems.org"
gem 'guard'
gem 'guard-livereload'
gem 'rack-livereload'
@syahrasi
syahrasi / Gemfile
Created January 2, 2014 06:34
Rack-livereload with Sinatra
group :development, :test do
gem "guard-livereload"
gem "rack-livereload"
end
@syahrasi
syahrasi / SassMeister-input-HTML.html
Created November 21, 2013 04:03 — forked from jedfoster/SassMeister-input-HTML.html
Generated by SassMeister.com.
<p>Demo cribbed from <a href="http://viget.com/extend/sass-maps-are-awesome">viget.com/extend/sass-maps-are-awesome</a></p>
<ol>
<li><a href="#" class="profile-link--bandcamp profile-link">Bandcamp</a></li>
<li><a href="#" class="profile-link--delicious profile-link">Delicious</a></li>
<li><a href="#" class="profile-link--facebook profile-link">Facebook</a></li>
<li><a href="#" class="profile-link--ficly profile-link">Ficly</a></li>
<li><a href="#" class="profile-link--flickr profile-link">Flickr</a></li>
<li><a href="#" class="profile-link--github profile-link">GitHub</a></li>
<li><a href="#" class="profile-link--googleplus profile-link">Google+</a></li>