Skip to content

Instantly share code, notes, and snippets.

View miccheng's full-sized avatar

Michael Cheng miccheng

View GitHub Profile
@miccheng
miccheng / gist:5023187
Created February 24, 2013 09:06
Testing video tag.
<!DOCTYPE html>
<html>
<head>
<title>Video Tag Test</title>
<style type="text/css">
video{
border: 1px solid #000;
}
</style>
</head>
<?php
set_time_limit(0);
$fp = fopen (PHOTO_PATH.$server_username.".jpg", 'w+');
$ch = curl_init("http://www.examp.com/test.jpg");
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
fclose($fp);
@miccheng
miccheng / gist:8253012
Last active January 2, 2016 04:49
Software i use.

#Software#

##Downloads##

  • Java Runtime
  • Chrome
  • Firefox
  • Dropbox
  • Google Drive
  • PHPStorm
  • Alfred v2
@miccheng
miccheng / Alternative.php
Last active January 3, 2016 20:19
Alternatives to the massive if-else statements.
<?php
function register()
{
// Just return the form because there's no need going through the rest of the call stack below.
if (empty($_POST)) return register_form();
// Setting some defaults.
$msg = '';
$success = false;
try
@miccheng
miccheng / 0_reuse_code.js
Created January 26, 2014 06:11
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
@miccheng
miccheng / is_rsa.pub
Created March 17, 2014 02:56
SSH Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxRRDYFyVZ9oJDag2FBuxL9MzSVXSzJh/vT8KSEF6KYUvjPW257lK+iIWeK0x5yAHZ1OetJ9s0nYZRIfkLkf1HlJMrRRYgaZRKZuzlqmE00ozP6LHPSW4DaxPT+NElnUYoznlgCCM9A+A4ZNdOUgBHXc44qY0QdmDRQBTgS5JLEoSafa6o3MU3gvTPwK7POVxFtm+pmfix4OOxqNN0S/qoHMCfKwrp4737CEpJgqE6cgopNkG9pnFC90ZgYK/bbpD24KKRNf/aXhJsKEU+81c4WL88P6vZR3NIioNhqjgpqFFryXNc6P0F47XpFjdz9L2kvu4GuVQxEeHyV78ozxrfw== miccheng@miccheng-laptop

Keybase proof

I hereby claim:

  • I am miccheng on github.
  • I am miccheng (https://keybase.io/miccheng) on keybase.
  • I have a public key ASBG7RTVZWMBp1_j-q9URLeYrz5FpXgCDYEmHA89l8TDUQo

To claim this, I am signing this object:

The Government Digital Services team is seeking an accomplished Senior Software Engineer. We are a team in GovTech that aims to design and develop software applications that help government agencies to better serve the needs of Singaporeans. We adopt an Agile development approach and work towards adopting tech best practices and cutting edge tools.
As a Senior Software Engineer, you will be participating in Agile software development and technical consultancy for government agencies, particularly in the development of engaging, user-centric citizen-facing web and mobile applications. You will also be focusing on growing the competency of our technical team, for example through pair programming, code reviews, knowledge sharing and mentoring.
We are not looking for a diva 10x engineer. A wise developer once tweeted: “How to be a 10x engineer: help ten other engineers be twice as good.” That is the kind of 10x engineer we are looking for – a capability multiplier, someone who can leverage his deep experience

Hi,

You have expressed interest to participate in Global Day of CodeRetreat 2020. We would like to share some information about what to expect during this event. Coderetreat is about “focused practice” - learning of “how-to” instead of “what-to”. It is useful for developers at all levels, from beginners (who have learned the syntax of at least one language) to experienced professional programmers. This kind of learning is best achieved in groups. We encourage working in pairs or larger groups (known as “MobProgramming” or “All People In programming”).

We have decided to host this year’s coderetreat online, and limit it to half a day because lack of physical interaction makes collaborative work much harder for many people. Because of that we want to spend very little time on introduction and organization and rely instead on prep-work by participants and the power of self-organization.

Prep work

  1. Please read https://www.coderetreat.org/the-workshop/
  2. Make sure you read the 4 rules of Game Of Life (w