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();
Verifying my Blockstack ID is secured with the address 1LGooxMiAFWtmBA1sa4VuWzHHQEQT5f1Dc https://explorer.blockstack.org/address/1LGooxMiAFWtmBA1sa4VuWzHHQEQT5f1Dc
@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 / SassMeister-input-HTML.haml
Created February 10, 2014 06:14
Generated by SassMeister.com.
.wrapper
- 20.times do |i|
%div{:class =>"box box-#{i+1} height-#{1 + rand(3)}"}
box
@syahrasi
syahrasi / SassMeister-input-HTML.haml
Created January 30, 2014 06:54
Generated by SassMeister.com.
.wrapper
- 20.times do |i|
%div{:class =>"box box-#{i+1} height-#{1 + rand(3)}"}
box
@syahrasi
syahrasi / SassMeister-input-HTML.haml
Created January 23, 2014 10:28
Generated by SassMeister.com.
- 4.times do |i|
%div{:class => "box cyan-box-#{i + 1}" }
- 25.times do |i|
%div{:class => "box blue-box-#{i + 1}" }
- 18.times do |i|
%div{:class => "box purple-box-#{i + 1}" }
- 6.times do |i|
%div{:class => "box pink-box-#{i + 1}" }
- 9.times do |i|
%div{:class => "box red-box-#{i + 1}" }
@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.'
@syahrasi
syahrasi / SassMeister-input-HTML.haml
Created January 22, 2014 02:39
Generated by SassMeister.com.
- 4.times do |i|
%div{:class => "box box-hilite-#{i + 1}"}
- 4.times do |i|
%div{:class => "box box-primary-#{i + 1}"}
- 4.times do |i|
%div{:class => "box box-shadow-#{i + 1}"}