Skip to content

Instantly share code, notes, and snippets.

View bxcodec's full-sized avatar
:octocat:
Learning and Making

Iman Tumorang bxcodec

:octocat:
Learning and Making
View GitHub Profile
@devshareid
devshareid / 1_0_SHORT_POLLING.md
Last active December 17, 2020 12:47
Short Polling, Long Polling, Server-Sent Event, WebSocket

Short Polling

@tomysmile
tomysmile / mac-php-composer-setup.md
Created July 11, 2016 10:45
Setup PHP Composer using Brew
@techslides
techslides / golang-prettyurl.go
Created February 13, 2014 16:38
Generating Pretty Urls for SEO in GoLang using string and regex packages
type Post struct {
// db tag lets you specify the column name if it differs from the struct field
Id int64 `db:"post_id"`
Created int64
Title string `form:"Title" binding:"required"`
Body string `form:"Body"`
UserId int64 `form:"UserId"`
Url string
}
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: