Skip to content

Instantly share code, notes, and snippets.

View chinchang's full-sized avatar
🏠
Building cssbattle.dev

Kushagra Gour chinchang

🏠
Building cssbattle.dev
View GitHub Profile
@jsnkuhn
jsnkuhn / dabblet.css
Created July 8, 2012 14:53
Old Man (box-shadow)
/* Old Man (box-shadow)*/
body{background:#000;color:#fff;}
a{color:#f00;}
#art {
width: 128px;
height: 128px;
}
#art div{
width: 8px;
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@cowboy
cowboy / Gruntfile.js
Created March 18, 2013 17:21
Sample Gruntfile for gruntjs/grunt#721
'use strict';
module.exports = function(grunt) {
// Override process.stdout to log the name+args of the current task before
// every logged line.
var hooker = require('hooker');
var newline = true;
hooker.hook(process.stdout, 'write', function(str) {
var prefix = grunt.task.current.nameArgs;
if (newline && prefix && str !== '\n') {
@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@teropa
teropa / angular_toc.md
Created November 11, 2013 18:39
A preliminary table of contents for "Build Your Own AngularJS"

0. Project Setup

Part 1: Scopes

1. Scopes and Digest

2. Scope Inheritance

3. Watching Collections

Part 2: Expressions And Filters

4. Lexing Expressions

5. Parsing Expressions

6. Expressions On The Scope

7. Creating Filters

@xem
xem / codegolf.md
Last active August 1, 2024 14:30
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

// by d whyte
int[][] result;
float t;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@p01
p01 / List_of_demos.md
Last active August 29, 2015 14:09
List of demos in the Monster Audio-Visual demos in a TCP packet talk at JSConf EU 2014
# Rename mp3 files to naming convention of no number and no special character and hence making your music library cool again to read
# run this file in using terminal in music directory by command ./Mp3FileNameBeautify.sh
# and you are welcome to contribute, customize or whatever.
# suggestions are welcomed
# by - HARSH BHATIA
for i in *.mp3;
do
src=$i
# remove mp3 from name
tgt=$(echo $i | sed -E 's/(.mp3)//g')
@chinchang
chinchang / xmlToJson.js
Last active September 7, 2023 02:39
Function to convert XML to JSON
/**
* Changes XML to JSON
* Modified version from here: http://davidwalsh.name/convert-xml-json
* @param {string} xml XML DOM tree
*/
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) {