Skip to content

Instantly share code, notes, and snippets.

View giuliandrimba's full-sized avatar
🥁

Giulian Drimba giuliandrimba

🥁
View GitHub Profile
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@rayfranco
rayfranco / APACHE: .htaccess pushstate
Created July 30, 2012 23:04
.htaccess for HTML5 Pushstate support
<ifModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html
</ifModule>
@arboleya
arboleya / pvt_access_modifier_cs.coffee
Created August 10, 2012 14:20
Private methods/properties in CoffeeScript.
# PRIVATE METHODS/PROPERTIES - COFFEESCRIPT
# ------------------------------------------------------------------------------
# Simple hack to protect private methods and properties from outside classes,
# all props and methods starting with '_' will be unaccessible from outside.
class AccessModifiers
@for:( scope )->
api = {}
@millermedeiros
millermedeiros / updateLibs.sh
Last active October 11, 2015 12:37
Shell script to update 3rd party libs
#!/bin/sh
# This shell script is used to bootstrap the app and update external libraries
#
# ====== IMPORTANT ======
#
# it may break application if 3rd party libs aren't backwards compatible
# or if libs were edited locally, use with care !!!
@lipelopeslage
lipelopeslage / parallax-secret.js
Created November 21, 2012 18:30
My parallax secret
/*########################################################################*/
/*###### using jQuery selector for a fast/cross-browser resolution #######*/
/*########################################################################*/
var totalAreas = 6, // this value is obviously arbitrary
winH = $(window).height, // the window height
top = $(window).scrollTop(), // the current scroll value
maxScroll = $(document).height() - winH, // the maximum scroll value
scrollPerc = top/maxScroll, // the current scroll percentage
areaPercent = 0; // init variable
@banaslee
banaslee / XGH - en.txt
Last active June 18, 2024 06:53
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
@defunctzombie
defunctzombie / browser.md
Last active April 10, 2024 17:45
browser field spec for package.json
@arboleya
arboleya / microevent.coffee
Last active December 11, 2015 01:08
MicroEvent in CoffeeScript.
###
Port of MicroEvent in Coffeescript with some naming modifications
and a new 'once' method.
Original project:
https://github.com/jeromeetienne/microevent.js
###
class MicroEvent
_init:-> @_listn or @_listn = {}
_create:(e)-> @_init()[e] or @_init()[e] = []
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else