Skip to content

Instantly share code, notes, and snippets.

View hql287's full-sized avatar
:octocat:
making dots

Hung Q. Le hql287

:octocat:
making dots
View GitHub Profile
@hql287
hql287 / notification.jsx
Last active October 17, 2017 04:44
Self Closing Notification
class Notification extends Component {
constructor(props) {
super(props);
this.removeNoti = this.removeNoti.bind(this);
}
componentDidMount() {
this.timeout = setTimeout(this.removeNoti, 4000);
}
@hql287
hql287 / Enhance.js
Created August 23, 2017 07:58 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@hql287
hql287 / introrx.md
Created July 19, 2017 04:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@hql287
hql287 / xterm-256color-italic.terminfo
Created December 27, 2016 04:41
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
xterm-256color-italic|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
use=xterm-256color,
{% if craft.request.isAjax %}
{% set layout = "_ajaxLayout" %}
{% else %}
{% set layout = "_layout" %}
{% endif %}
{% extends layout %}
{% set limit = 10 %}
{% set params = { section: 'news', limit: limit} %}
@hql287
hql287 / haml_converter.rb
Created August 2, 2016 10:12 — forked from radamant/haml_converter.rb
Simple haml-sass conversion for jekyll
module Jekyll
require 'haml'
class HamlConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /haml/i
end
@hql287
hql287 / redis.sh
Last active August 29, 2015 14:21
#!/bin/sh
# Copyright 2011 Dvir Volk <dvirsk at gmail dot com>. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
@hql287
hql287 / foreign_chars.php
Last active January 9, 2016 04:56
Vietnamese Character Conversion Array for Text Helper used by Expressionengine
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@hql287
hql287 / .htaccess
Created December 17, 2013 04:42
.htaccess for ExpressionEngine
# SECURE .HTACCESS FILE
# ============================================================
<Files .htaccess>
order allow,deny
deny from all
</Files>
# DON'T SHOW ANY DIRECTORY WITHOUT AN INDEX FILE
# ============================================================
Options -Indexes