Skip to content

Instantly share code, notes, and snippets.

@shanselman
shanselman / ohmyposhv3-v2.json
Last active April 18, 2024 22:35
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active April 18, 2024 22:34
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@joulgs
joulgs / terminal.txt
Last active April 18, 2024 22:35
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@TylerB24890
TylerB24890 / block-converter.php
Created April 18, 2024 17:00
HTML to Gutenberg Block Converter
<?php
/**
* Block Converter.
* Convert HTML to Gutenberg Blocks.
*
* @package Tyme\BlockConverter
*/
namespace Tyme;
@neelbhanushali
neelbhanushali / usb-connected-hand-held-barcode-scanner-input.js
Last active April 18, 2024 22:32
Javascript for detecting usb connected - hand held - barcode scanner input
// Author: Neel Bhanushali <neal.bhanushali@gmail.com>
document.addEventListener('keydown', function(e) {
// add scan property to window if it does not exist
if(!window.hasOwnProperty('scan')) {
window.scan = []
}
// if key stroke appears after 10 ms, empty scan array
if(window.scan.length > 0 && (e.timeStamp - window.scan.slice(-1)[0].timeStamp) > 10) {
window.scan = []
@shaps80
shaps80 / AVPlayer+Scrubbing.swift
Last active April 18, 2024 22:31
Enables smooth frame-by-frame scrubbing (in both directions) – similar to Apple's applications.
public enum Direction {
case forward
case backward
}
internal var player: AVPlayer?
private var isSeekInProgress = false
private var chaseTime = kCMTimeZero
private var preferredFrameRate: Float = 23.98
import geopandas as gpd
import pandas as pd
import fiona
fiona.drvsupport.supported_drivers['kml'] = 'rw' # enable KML support which is disabled by default
fiona.drvsupport.supported_drivers['KML'] = 'rw' # enable KML support which is disabled by default
epc_data = pd.read_excel('./data/macromerge3.xlsm', sheetname='DomesticBulkDataAB')
geocodes = gpd.tools.geocode(["{}, {}".format(row.ADDRESS1, row.POSTCODE) for index, row in epc_data[:20].iterrows()],
provider='googlev3')
// ==UserScript==
// @name TweetXer
// @namespace https://gist.github.com/lucahammer/a4d1e957ec9e061e3cccafcbed599e16/
// @version 0.5
// @description Delete all your Tweets for free.
// @author Luca
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant unsafeWindow
// ==/UserScript==
@dj-mcculloch
dj-mcculloch / auto_wol.nfs
Last active April 18, 2024 22:18
autofs NFS Mount Executable Map with Wake-On-LAN and Path Validation
#!/bin/bash
# Author: dj-mcculloch
# Documentation: https://dj-does.medium.com/nfs-mounts-and-wake-on-lan-25c0c1d55c90
# Adaptation of rufflove's comment solution (https://www.blogger.com/profile/01096649615527099308) via tech-bodges'
# blog post from 2010 http://tech-bodges.blogspot.com/2010/06/linux-autofs-and-wake-on-lan-bodge.html as well as
# bryanchicken's post (https://forum.kodi.tv/showthread.php?tid=118164)
# {NFS_IP} is where you would put in your NFS' IPv4 address, e.g. the IP
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 18, 2024 22:15
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.