Skip to content

Instantly share code, notes, and snippets.

View artystable's full-sized avatar
🔍
Probably learning something new.

Arty Stable artystable

🔍
Probably learning something new.
View GitHub Profile
@westc
westc / fetchCORS.js
Last active December 10, 2020 07:36
Essentially uses a CORS proxy (https://cors-anywhere.herokuapp.com/) to easily retrieve data from any URL.
/**
* Fetches data at the specified URL by leveraging the CORS-Anywhere service.
* Important to note that if this service goes down, this function will no
* longer work. If needed for production it would be best to create your own
* server-side CORS solution which fetch data from the specified URL.
*
* @param url {string}
* The URL from where to fetch the data.
* @param callback {function(boolean, string, string, XMLHttpRequest)}
* The callback function called either on success or failure of fetching the
@Aschen
Aschen / README.md
Last active September 10, 2025 10:04
Get random card from a Trello board

Shuffle Trello : Pick a random card in a column

This small script pick a random card in a column on a Trello board.

We use this script at Kuzzle to pick a random card for our product workshop.

Usage

@pcgeek86
pcgeek86 / cheatsheet.ps1
Last active November 7, 2025 01:17
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command

Reader Mode.js

Add as bookmarklet (see below):

javascript:/* Reader Mode.js /(function(){ const IFWL=['gfycat.com','disqus.com','www.youtube.com',location.host,];const ifbl=new RegExp('derstandard\.at\/AdServer\/');const startupTasks=[disableViewport,];const periodicTasks=[disableStaticFloaters,removeIframes,];function disableStaticFloaters(){for(let e of document.getElementsByTagName('')){if(window.getComputedStyle(e).position.startsWith('fixed')){e.style.setProperty('position','static','important');}}}function removeIframes(){const iframes=getAllIframesRecursively();for(const e of getAllIframesRecursively().reverse()){try{const doRemove=(!e.src)? false : IFWL.indexOf(new URL(e.src).host)==-1 ? true : e.src.match(ifbl)? true : false;if(doRemove&&e.parentElement){e.parentElement.removeChild(e);}}catch(err){reportError(err,['FAILED TO REMOVE IFRAME',e]);}}window.readerModeRemainingIframes=getAllIframesRecursively();}function disableViewport(){const vp=document.querySelector('meta[name=v

@westc
westc / gsheets-search-engine.html
Last active November 10, 2022 01:53
A simple search engine that only uses JavaScript and Google sheets. NO DATABASE REQUIRED!
<!DOCTYPE html>
<html>
<head>
<title>Custom Search Engine Using Google Sheets</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.3/vue.min.js"></script>
<script type="text/javascript">
@jiaaro
jiaaro / async_children_with_cleanup.sh
Last active May 7, 2021 23:38
Run some commands asynchronously in bash and then make sure to kill the child processes if the user kills the process with CTRL-C (or similar)
#!/bin/bash
trap "exit" INT TERM # Convert INT and TERM to EXIT
trap "kill 0" EXIT # Kill all children if we receive EXIT
# Run stuff in the background
sleep 3 &
sleep 4 &
# Find child processes and wait for them to finish so this script doesn't
@nicolasdao
nicolasdao / open_source_licenses.md
Last active October 30, 2025 16:31
What you need to know to choose an open source license.
@sebble
sebble / stars.sh
Last active October 27, 2025 01:21
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@jserrao
jserrao / url-segment.js
Created July 27, 2016 14:41
Get Last Segment of a URL in Javascript
var pageURL = window.location.href;
var lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1);
console.log(lastURLSegment);
@lmarkus
lmarkus / README.MD
Last active November 6, 2025 15:30
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...