Skip to content

Instantly share code, notes, and snippets.

View uplime's full-sized avatar
👻
Spooky

Nicholas Chambers uplime

👻
Spooky
View GitHub Profile
@havenwood
havenwood / now_and_every.rb
Last active December 24, 2019 17:28
An example showing time now slipping, as long as job takes less time than interval
require 'async'
require 'async/notification'
def do_a_thing_lasting(duration)
puts 'hi'
sleep duration
puts 'bye'
end
def now_and_every(interval)
@havenwood
havenwood / download_ruby_tarballs
Created December 22, 2019 23:25
Download the latest Ruby tarballs with async-http: https://github.com/socketry/async-http
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'async'
require 'async/barrier'
require 'async/http/client'
require 'async/http/endpoint'
require 'async/logger'
require 'optionparser'
@John-Paul-R
John-Paul-R / FabricModList.md
Last active May 2, 2024 16:37
A list of (almost all) mods for Fabric

Fabric Mod List

This page contains a list of the current Minecraft Fabric mods. (As of 2021-08-19 08:05:23 Timezone: UTC+0000 (GMT))

To search for mods by name, category, or download count, visit the website, fibermc.com!

Note: You can view a mod's source files by following the "Source" link on its CurseForge page, assuming that the mod's creator has made such files public.

There are currently 2954 mods in this list.

@davidsword
davidsword / wpcli-media-count.php
Last active October 2, 2019 19:47
WordPress WPCLI - Count Media Library by Types
<?php
/**
* Implements `media-count` command.
*/
class WPCLI_Media_Library_Count {
/**
* Get total count of all media and break down counts for each media type.
*
* ## EXAMPLES
*
@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@macdja38
macdja38 / Confirm-gitlab-email.md
Created July 26, 2018 20:14
Confirm gitlab email by CLI

On your gitlab server run gitlab-rails console production

Find your user via user = User.find_by(email: "youroldemail@example.com")

Optionally change the user's email with user.email = "yournewemail@example.com" Then run user.save!

Get the user's token with user.confirmation_token

https://PutYourGitlabHere/users/confirmation?confirmation_token=PutYourTokenHere

#!/bin/bash
# file base64_encode.sh
# author mknod @ freenode
# license none
# bash version 3.2+
# description a beautifully slow implementation of base64 encoding in pure Bash
# synopsis ./base64_encode.sh
# stdin raw data
# stdout base64 encoded data
m=(3{0,2,4,7}\;4{0,2,4,7}) w=(0 1111 47f3 0fa 0ea cbb 1 1514 47f3 3ea caa0f bb0c 1 0101 0457 03fec 3faa2 3b88b3 2 0{011,57f7,0fa,caa} f88bb 4 1111 57f3 0eb 0ea cbb 5 1514 47f3 0eb 0ae0f bb0c 5 0{101,457,0efc,0ae3} 3b88b3 6 0{011,57f7,0fa,0ae} f88bb);for((i=0;i<75;x=++i/8*8+w[i%8*6])){ sleep .1;tput cup 0;for r in {1..5};{ printf %$x.s;eval printf %b▀ '\\e[${m[0x${w[i%8*6+r]:'{0..6}:1}]}m;echo;};}
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@tristanwagner
tristanwagner / dbdump.py
Last active October 5, 2022 18:27
CSV list of items id and names Vanilla WoW 1.12.1 from https://github.com/LightsHope/database
# encoding=utf8
import sys
import csv
import mysql.connector
# Connect to MSSQL Server
try:
conn = mysql.connector.connect(host="", user="",password="", database="")