Skip to content

Instantly share code, notes, and snippets.

View nickwanhere's full-sized avatar

Nick Wan nickwanhere

  • Hong Kong
View GitHub Profile
sudo dpkg-reconfigure tzdata
<?php
/**
* go to https://api.slack.com/web to create your access-token. The token will look somewhat like this:
* xoxo-2100000415-0000000000-0000000000-ab1ab1
*/
public static function slack($message, $channel) {
{
$ch = curl_init("https://slack.com/api/chat.postMessage");
$data = http_build_query([
@nickwanhere
nickwanhere / README.md
Last active August 29, 2015 14:26 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/