Skip to content

Instantly share code, notes, and snippets.

Bulding fun-project

Ardian Bahtiarsyah absyah

Bulding fun-project
Block or report user

Report or block absyah

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
absyah / samples.txt
Created Feb 21, 2019
Apisentris API Examples
View samples.txt
Apisentris API endpoints
table name: programmers
### Get Programmers
curl -H "client_id: 141000"\
-H "access_token: 3zov2Syn0ahUfqwuFYw0VQ"\
absyah / base.rb
Created Dec 28, 2018 — forked from sunny/base.rb
Rails utility class for objets to act like ActiveRecord::Base
View base.rb
# encoding: utf-8
# Base class to inherit from for objects to act like ActiveRecord::Base
# without using a database. Lets you use validations, errors, forms, routes.
# Example:
# class Exporter < Base
# attributes_accessor :email, :data
# end
class Base
extend ActiveModel::Naming
absyah / index.html
Last active Nov 26, 2018
iframe widget
View index.html
(function(d, h, m){
var js, fjs = d.getElementsByTagName(h)[0];
if (d.getElementById(m)){return;}
js = d.createElement(h); = m;
js.onload = function(){
position: "left", // left || right
emailhash: "e5507bee9e0bb54a1c5ea5df164c74a1", // your md5 encoded email address
View gist:c9cc9e0ddc8ad54af52f47f252a59523
# Video:
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
absyah / execute
Last active Apr 16, 2018
mass linking script
View execute
csv_text ='/home/ardian/Downloads/mass_link.csv')
csv = CSV.parse(csv_text, :headers => true)
csv.each do |row|
hash = row.to_hash
hash['SKU Elevenia']
hash['Master SKU Forstok']['Master SKU Forstok'], hash['SKU Elevenia']).link
absyah /
Created Jan 28, 2018 — forked from iros/
Documenting your REST API


<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

View meleduk_controller.rb
def priority_setting
@ahp_setting = current_user.ahp_setting
unless @ahp_setting.blank?
@pairwise = Matrix.identity(7).to_a
arr = []
@ahp_setting.attributes.each do |i, val|
unless i == "id" || i == "user_id" || i == "created_at" || i == "updated_at"
absyah / remove-video.js
Last active Oct 20, 2017 — forked from danro/remove-video.js
Remove HTML5 video and clear src attribute to prevent leaks.
View remove-video.js
$('video source').each(function(num,val){
$(this).attr('src', 'newSourceValue')
View create_item.rb
# url
# headers
# {
# :"Content-type"=>"application/json",
# :Authorization=>"27b2a692fbcd1b4b97824479389b900680b5abb18c5b8a0e20004a6c1158eb99",
# :"cache-control"=>"no-cache"
# }
# response
You can’t perform that action at this time.