Skip to content

Instantly share code, notes, and snippets.

View firewalker06's full-sized avatar

Didik Wicaksono firewalker06

View GitHub Profile
@LeaVerou
LeaVerou / dabblet.css
Created March 15, 2013 01:05
iOS 6 style switch checkboxes
/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@firewalker06
firewalker06 / gist:4696072
Created February 2, 2013 04:07
Beautify JSON, copied from http://pastebin.com/xB0fG9py
<?php
/**
* @author Marcelius 'mardagz' Dagpin
* @name Beautify JSON
* @copyright 2012
* @uses /
* $json_array = array(
* "name" => "mardagz",
* "gender" => "lalaki po akow hihihi",
* "age" => 40
<!DOCTYPE>
<html>
<head>
<title>Dissecting Gmail's Email Attachments - Dropping Files</title>
<style>
.msg {
display: none
}
.dragging .msg {
@peteboere
peteboere / README.md
Created November 26, 2012 12:20
Avoid console errors in browsers that lack a console.
@scottatron
scottatron / nginx_unicorn.erb
Created September 16, 2012 05:20
Rails / Dragonfly / nginx X-Sendfile (aka X-Accel-Redirect)
upstream unicorn {
server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name example.com;
root <%= current_path %>/public;
if (-f $document_root/system/maintenance.html) {
@natali
natali / jne.php
Created September 9, 2012 13:48
Cek resi TIKI JNE/TIKI
<html>
<head>
<title>Check AWB</title>
<style type="text/css">
BODY, TD, INPUT {
font-family:Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
INPUT.submit {
@marcedwards
marcedwards / high-dpi-media.css
Last active September 24, 2025 23:32
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active October 22, 2025 05:42
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@them0nk
them0nk / rspec_rails_cheetsheet.rb
Created March 23, 2012 03:39
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.