Skip to content

Instantly share code, notes, and snippets.

View ghinda's full-sized avatar

Ionuț Colceriu ghinda

View GitHub Profile
@ghinda
ghinda / index.html
Last active March 4, 2020 14:10
Gorgias Templates CRM plugin
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea cols="100" rows="10"></textarea>
<p>
Test variable support with this template:

Keybase proof

I hereby claim:

  • I am ghinda on github.
  • I am ghinda (https://keybase.io/ghinda) on keybase.
  • I have a public key ASAOWAnaZwcwDPMwiniaFlTwbK_TNgvVZ4M9RYqgYOVH7wo

To claim this, I am signing this object:

@ghinda
ghinda / test.html
Created May 18, 2016 08:59
jotted-play-test.html
hotpink
@ghinda
ghinda / test.css
Last active May 18, 2016 08:59
jotted-play-test-css
body {
background: 'hotpink'
}
@ghinda
ghinda / responsive-tables.js
Created April 12, 2015 13:07
ZURB responsive-tables, patched for better performance
/* ZURB responsive tables, patched for performance.
* http://zurb.com/playground/responsive-tables
*
* patched for better performance when reading the TR>TD height,
* by getting the height directly from the TR, instead of TR>TD.
*
* USE:
* - include the responsive-tables.css file from
* https://github.com/zurb/responsive-tables/
* - include this js file, instead of responsive-tables.js
@ghinda
ghinda / git-commit-csv-export.sh
Last active July 30, 2024 13:46
git csv export of commits in the last month
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv
@ghinda
ghinda / git-delete-local-branches.sh
Created March 19, 2015 21:08
Delete all local tracking git branches for which the origin remote branches have been deleted
git for-each-ref --format='%(refname:short)' refs/heads/* | while read branch; do BRANCH_EXISTS=$( git ls-remote --heads origin $branch | wc -l ); if [ $BRANCH_EXISTS -eq 0 ]; then git branch -D $branch; fi;done
@ghinda
ghinda / object-to-form-data.js
Last active September 17, 2024 05:22
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
@ghinda
ghinda / favicon-convert
Created October 6, 2013 13:43
Generate favicon from png with imagemagick
$convert favicon.png -bordercolor white -border 0 \
\( -clone 0 -resize 16x16 \) \
\( -clone 0 -resize 32x32 \) \
\( -clone 0 -resize 48x48 \) \
\( -clone 0 -resize 64x64 \) \
-delete 0 -alpha off -colors 256 favicon.ico
@ghinda
ghinda / gist:6036998
Last active June 9, 2020 20:55 — forked from remy/gist:350433
local/session storage polyfill (@Rem's version + with support for opera mini)
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();