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
@chinchang
chinchang / atomic-vs-oocss.html
Created March 29, 2016 18:28
Comparing code for OOCSS and Atomic CSS
<!--
Example: A simple list component with each item as a block one below other with some padding and border.
-->
<!-- Atomic CSS -->
<ul class="MB(baseSpacing) Bgc(#0280ae)">
<li class="P(halfBaseSpacing) BdB(1px)"></li>
...
</ul>
@blueboxes
blueboxes / JS13KGamesResources.md
Last active August 13, 2018 06:53
This is a list of useful links, resources and tutorials for creating an JS13K Games entry. The items are in no particular order. Please feel free to suggest additions or edits to the list.
@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) {
# 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')
@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
// 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) {
@xem
xem / codegolf.md
Last active March 22, 2024 15:41
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)

@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

@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
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.

@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') {