Skip to content

Instantly share code, notes, and snippets.

View SunDi3yansyah's full-sized avatar

Cahyadi Triyansyah SunDi3yansyah

View GitHub Profile
christiawaneko / import_blog.rb
Last active August 29, 2015 14:06
cara import blogger ke octopress :)
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby bimport_blog.rb blog_kamu.xml
data = ARGV[0]
doc = Nokogiri::XML(data)
hergipriyambodo / dot js
Created January 14, 2015 09:00
Ojo lali di copy
<script type="text/javascript">
selector: "textarea",
theme: "modern",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor"
feryardiant /
Last active January 21, 2016 14:33
Thue Morse Sequence - PHP Implementation

Thue Morse Sequence - PHP Implementation

Recently, I got a job vacancy test and this is the one of questions i've got. I'm absolutely new here so CMIIW 😉


Simply download the gist and create new file called whatever.php then copy-paste lines below:

!#/usr/bin/env php
natali / jne.php
Created September 9, 2012 13:48
<title>Check AWB</title>
<style type="text/css">
font-family:Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
INPUT.submit {
hok00age / RajaOngkir Widget Code
Last active May 28, 2016 19:20
Code untuk menambahkan widget pengecekan ongkos kirim
<div data-theme="light" id="rajaongkir-widget"></div>
<script type="text/javascript" src="//"></script>
gmaggio / yahoo-online-status-detection.php
Created July 8, 2014 11:42
[Yahoo] Yahoo Messenger Online/Offline Status Detection #soical-media
$yahooID = "YOUR_ID";
$status = file_get_contents("".$yahooID."&m=a&t=1");
if ($status === '00') {
echo "OFFLINE!";
} else if ($status === '01') {
echo "ONLINE!";
tnmt / wp-xml-octopress-import.rb
Created November 15, 2011 12:31
Import XML of Wordpress to Octopress
# -*- coding: utf-8 -*-
require 'fileutils'
require 'date'
require 'yaml'
require 'uri'
require 'rexml/document'
include REXML
doc =[0])
fred / application_controller.rb
Created April 29, 2012 07:20 — forked from skamithi/application_controller.rb
Adding Opensearch to my Rails 3.2 app
class ApplicationController < ActionController::Base
def opensearch
response.headers['Content-Type'] = 'application/opensearchdescription+xml; charset=utf-8'
mattboldt / authentications_controller.rb
Last active April 21, 2017 16:59
OmniAuth & Octokit.
class AuthenticationsController < ApplicationController
# This is the callback method from OmniAuth's GitHub authentication.
# following
def create
omniauth = request.env["omniauth.auth"]
authentication = Authentication.find_by_provider_and_uid(omniauth['provider'], omniauth['uid'])
if authentication
sign_in_and_redirect(:user, authentication.user)