Skip to content

Instantly share code, notes, and snippets.

@mmhan
mmhan / how-i-work-template.md
Created July 22, 2022 02:21 — forked from jazzsequence/how-i-work-template.md
Template for How I Like to Work posts

How I work

This is my own interpretation of how I like to work, feedback welcome! Especially if my own view of how I think I like to work doesn't match your experience of how it seems I like to work!

When I work

// simple constructor
//
private final int x;
private final int y;
private final String z;
public MyClass(int x, int y, String z) {
this.x = x;
this.y = y;
this.z = z;
@mmhan
mmhan / MCAPI.php
Created December 26, 2012 07:50 — forked from anonymous/MCAPI.php
<?php
class MCAPI {
var $version = "1.3";
var $errorMessage;
var $errorCode;
/**
* Cache the information on the API location on the server
*/
@mmhan
mmhan / UserAccessLogTest.java
Created June 8, 2012 11:08 — forked from anonymous/UserAccessLogTest.java
Reading the input from logfile. Printing the unique login ID from the past 10 mins.
import java.util.*;
import java.io.*;
import java.util.StringTokenizer;
public class UserAccessLogTest extends GenericTest
{
private String filePath ="";
public UserAccessLogTest(String args[])
{
@mmhan
mmhan / git-extract.sh
Created March 8, 2012 08:47 — forked from StanAngeloff/git-extract.sh
Get those changed files out of Git
#!/bin/bash
BOLD="\033[1m"
_BOLD="\033[22m"
RED="\033[31m"
YELLOW="\033[33m"
GREEN="\033[32m"
RESET="\033[39m"
range=$1
@mmhan
mmhan / dabblet.css
Created January 6, 2012 20:20 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
html, body{
height: 100%;
}
.content_botbg{
background: #eeeeee;
background: -moz-linear-gradient(top, #eeeeee 0%, #ededed 16%, #e5e5e5 43%, #dddddd 57%, #d0d0d0 73%, #d0d0d0 75%, #cccccc 77%, #b7b7b7 100%);
@mmhan
mmhan / index.htm
Created October 3, 2011 10:12 — forked from anonymous/script.js
Basic Structure For JS
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Lorem ipsum</title>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>window.jQuery || document.write("<script src='js/libs/jquery-1.6.2.min.js'>\x3C/script>")</script>
@mmhan
mmhan / script.js
Created September 27, 2011 02:51 — forked from anonymous/script.js
base modular pattern for script.js
bizintel = {
/** Should give a brief overview of what kinda scripts are running on this site **/
init: function(){
//call function accordingly
banner.init();
new.init();
},
banner:{
config:{
@mmhan
mmhan / javascript_in_php
Created September 26, 2011 08:37 — forked from Djuki/javascript_in_php
Mix javascript and php
$javascript = <<<JS
function javascriptFunction()
{
/* Some javascript code here */
}
JS;
function FBReady( func ) {
// If facebook is already loaded,
// just call the function
if ( FBReady.done ) return func();
// If the stack already exists,
// push the function onto it,
// otherwise, initialize a stack
// of functions