Skip to content

Instantly share code, notes, and snippets.

@streetturtle
streetturtle / sp
Last active March 28, 2024 19:40 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@theramiyer
theramiyer / arch-arm-rpi3-b-plus.md
Last active March 28, 2024 19:39
Install Arch Linux (ARM) on Raspberry Pi 3 Model B+

Install Arch Linux (ARM) on Raspberry Pi B+

Created 17 Aug 2018

This is a simple installation that I did on my Raspberry Pi. Of course, this is only one of the many reasons to do it.

Here are my requirements:

@njanakiev
njanakiev / concat_images.py
Created March 28, 2019 15:32
Concat images in a matrix grid with Python and PIL
import os
import random
from PIL import Image, ImageOps
def concat_images(image_paths, size, shape=None):
# Open images and resize them
width, height = size
images = map(Image.open, image_paths)
images = [ImageOps.fit(image, size, Image.ANTIALIAS)
@mandiwise
mandiwise / Update remote repo
Last active March 28, 2024 19:36
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 19:34
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@kepano
kepano / obsidian-web-clipper.js
Last active March 28, 2024 19:29
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@zenoyu
zenoyu / gist:f63799a9079a5df376d5daf3cea27be4
Last active March 28, 2024 19:28
AWS Lambda (Node) - Using Insight API to Query your Cloudwatch Log for Daily Error Report
/**
* AWS Lambda (Node) - Using Insight API to Query your Cloudwatch Log for Daily Error Report
* @author Zeno Yu <zeno.yu@gmail.com>
*/
const AWS = require('aws-sdk');
var cloudwatchlogs = new AWS.CloudWatchLogs();
exports.handler = async (event) => {
// Cloudwatch Log Group name
@ceving
ceving / Web Component for Copyright Years.md
Last active March 28, 2024 19:27
Web Component for Copyright Years
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 28, 2024 19:25
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code