Skip to content

Instantly share code, notes, and snippets.

View kidonchu's full-sized avatar

Kidon Chu kidonchu

View GitHub Profile
@kidonchu
kidonchu / approve_pr.json
Last active May 16, 2017 22:17
github webhooks' payloads
// POST /payload HTTP/1.1
// Host: homestead.app
// User-Agent: GitHub-Hookshot/0878b99
// Content-Length: 21731
// Accept: */*
// Content-Type: application/json
// X-Forwarded-For: 192.30.252.45
// X-Github-Delivery: 43295b00-3a83-11e7-80a2-4336d591cd35
// X-Github-Event: pull_request_review
// X-Original-Host: 839ce241.ngrok.io
@kidonchu
kidonchu / pull.go
Created November 3, 2016 13:47 — forked from sithembiso/pull.go
git pull using git2go
func (repo *Repo) Pull() error {
branch, err := repo.Branch()
if err != nil {
return err
}
// Get the name
name, err := branch.Name()
if err != nil {
return err
@kidonchu
kidonchu / 0_reuse_code.js
Created November 10, 2015 17:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kidonchu
kidonchu / magento-get-current-date-and-time.php
Created March 21, 2014 15:36
Magento - get current date and time
<?php
$now = Zend_Date::now()
->setLocale(Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_LOCALE))
->setTimezone(Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE))
->get('y-MM-dd HH:mm:ss');