Skip to content

Instantly share code, notes, and snippets.

View sanjitbakshi's full-sized avatar
😀

Sanjit Bakshi sanjitbakshi

😀
View GitHub Profile
@chockenberry
chockenberry / finder_icons.sh
Last active February 10, 2024 19:05
A simple shell script to turn the Finders desktop icons on and off
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
defaults write com.apple.finder CreateDesktop false
osascript -e 'tell application "Finder" to quit'
open -a Finder
@TomByrne
TomByrne / MultiExporter.jsx
Last active November 24, 2025 05:37
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
//
@fregante
fregante / TimelineLite.addDelay.js
Last active December 24, 2018 11:53
Method to add delays at any position in Greensocks TimelineLite and TimelineMax (Javascript GSAP)
/**
* Add a delay at the end of the timeline (or at any label)
* @param {number} delay Seconds to wait
* @param {string} position Label name where to start the delay
*
* Usage: tl.addDelay(4); //easy!
*/
TimelineLite.prototype.addDelay = function (delay, position) {
var delayAttr;
if(typeof delay === 'undefined' || isNaN(delay)){
@brucemcpherson
brucemcpherson / d3.vba
Last active July 4, 2024 04:41
Module for creating d3 charts from excel data
Option Explicit
' v1.01
Public Sub d3forceHere()
d3ForceDo
End Sub
Public Sub d3forceHereItunes()
d3ForceDo , "itunes force options", "itunes force fields"
End Sub
Public Sub d3forceHereNodesOnly()
d3ForceDo , "nodes only force options", "nodes only force fields"
@rjz
rjz / retina-scaling.js
Created November 25, 2012 19:00
Scaling images for Retina Displays
/**
* Provide support for retina-specific image elements and background styles
* see: http://blog.rjzaworski.com/2012/11/scaling-images-for-retina-displays/
*/
(function (doc) {
var opts = {
find: /(.+)(\.\w{3,4})$/,
replace: '$12x$2',