Skip to content

Instantly share code, notes, and snippets.

@RonnyO
RonnyO / wa.me.bookmarklet.js
Last active September 10, 2022 07:52
Message any number on WhatsApp - Bookmarklet
javascript:void%20function(){let%20a=prompt(%22Type%20a%20phone%20number%22,%22+972%22);a=a.replace(/^0/,%22+972%22).replace(`${%22+972%22}0`,%22+972%22).replace(/-/g,%22%22),window.open(%22https://wa.me/%22+a,%22_blank%22)}();
@jeongtae
jeongtae / usePrevious.ts
Last active September 16, 2023 17:30
usePrevious React hook in Typescript
import { useEffect, useRef } from 'react';
function usePrevious<T>(value: T): T | undefined {
const ref = useRef<T>();
useEffect(() => {
ref.current = value;
}, [value]);
return ref.current;
}
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 26, 2024 00:27
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@terraboops
terraboops / README.md
Last active April 27, 2022 10:35
Fullscreen Widget for the Dashing dashboard from Shopify

Include in your dashboard like this:

<div data-id="fullscreen" data-view="Fullscreen"></div>

It doesn't even need to be part of the grid, Dashing will happily initialise it anywhere on your page. It is invisible.

Once added to your page, Hit 'f' to enter fullscreen.

@fijimunkii
fijimunkii / log-image.js
Created October 18, 2014 03:18
console.log a gif (from cssconf.eu)
console.log("%c+","font-size: 1px; padding: 180px 320px; line-height: 360px; background: url(http://i.imgur.com/kZfvHRV.gif); background-size: 640px 360px; color: transparent;");
@melekes
melekes / README.md
Created August 30, 2013 08:51
Yet another Google Calendar Dashing widget

Yet another Google Calendar Dashing widget

Yet another Google Calendar Dashing widget

Description

Dashing widget to display first two coming-up Google Calendar events.

Basically, you do not need more than two events on your dashboard, but it can be easily extended to the neighboring cells and show, say, 4 events instead of 2.

@willjohnson
willjohnson / README.md
Last active October 6, 2021 13:52
Asana tasks widget for Dashing

Description

A Dashing widget for displaying tasks assigned to you in Asana.

Dependencies

@toolmantim
toolmantim / Makefile
Last active December 5, 2022 23:14
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@ilyakatz
ilyakatz / Readme.md
Last active March 5, 2020 12:19
MixPanel job for Dashing

Description

Simple Dashing job to display total number of events in MixPanel .

##Preview

##Dependencies

@jfeldstein
jfeldstein / get_campaigns.js
Created August 2, 2013 20:55
Persistent referrer and UTM campaign tracking for Segment.io
getReferrerTraits = function() {
// Requires: jQuery, jQuery.cookie, segment.io
// TODO: Update referralHost:blackList with your domain, so we only track external referrers.
var analytics_args = [],
analytics_traits,
acquisitionSource,
firstReferrer,
firstCampaign,