Skip to content

Instantly share code, notes, and snippets.

@aponxi
aponxi / index.html
Created October 18, 2014 23:00
Bootstrap 3.2 and Font Awesome 4.2.0 Minimal Templates for HTML and Jade
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
@aponxi
aponxi / console.js
Created September 30, 2014 00:52
Console Take Over
function cnsl(){
var console = window.console
if (!console) return
function intercept(method){
var original = console[method]
console[method] = function(){
// do sneaky stuff
if (original.apply){
// Do this for normal browsers
original.apply(console, arguments)
@aponxi
aponxi / README.md
Last active August 29, 2015 14:05
How to: Check the bash shell script is being run by root or not

How to: Check the bash shell script is being run by root or not

by NIX CRAFT on NOVEMBER 12, 2007 · 22 COMMENTS· LAST UPDATED JANUARY 6, 2008 in CENTOS, DEBIAN LINUX, FREEBSD

http://www.cyberciti.biz/tips/shell-root-user-check-script.html

Sometime it is necessary to find out if a shell script is being run as root user or not.

When user account created a user ID is assigned to each user. BASH shell stores the user ID in $UID variable. Your effective user ID is stored in $EUID variable. You can

@aponxi
aponxi / README.md
Last active August 29, 2015 14:04
Reports how many folders are there without git repo

No Git

usage

  • Copy script to bin folder ~/bin
  • Run no-git

Output

@aponxi
aponxi / Spritz-Speed-Reading-V2.markdown
Created June 21, 2014 07:43
A Pen by Logan Howlett.
@aponxi
aponxi / Colors.coffee
Last active December 31, 2015 21:58
Colors
Colors = [
name: "indian red"
hex: "#B0171F"
,
name: "crimson"
hex: "#DC143C"
,
name: "lightpink"
hex: "#FFB6C1"
,

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

@aponxi
aponxi / fontforge_script.py
Created September 1, 2013 05:47
A Sample Script to generate fonts.
import fontforge
font = fontforge.open("fonts/wxi.sfd");
print font
fontforge.font.generate(font, "dist/font/weaponxi.ttf");
fontforge.font.generate(font, "dist/font/weaponxi.otf");
fontforge.font.generate(font, "dist/font/weaponxi.svg");
fontforge.font.generate(font, "dist/font/weaponxi.woff");
fontforge.font.close(font)
@aponxi
aponxi / cs-jq-plugin-template.coffee
Last active December 21, 2015 14:59 — forked from rjz/cs-jq-plugin-template.coffee
modified to make it check if method/object exists in the class, if its a method calls it.
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->