Skip to content

Instantly share code, notes, and snippets.

@taskylizard
taskylizard / fmhy.md
Last active May 2, 2024 09:21
/r/freemediaheckyeah, in one single file (view raw)
@guicattani
guicattani / befunge.rb
Last active May 2, 2024 09:19
Ruby interpreter for Esoteric Language Befunge https://en.wikipedia.org/wiki/Befunge
def interpret(code)
Befunge.new(code).interpret
end
class Array
def second
self[1]
end
def second=(val)
@phred
phred / unserialize.php
Created September 7, 2011 19:04
Simple reliable and non-regex method to unserialize PHP session data
//
// This is the result of about an hour's delving into PHP's hairy-ass serialization internals.
// PHP provides a session_decode function, however, it's only useful for setting the contents of
// $_SESSION. Say, for instance, you want to decode the session strings that PHP stores in its
// session files -- session_decode gets you nowhere.
//
// There are a bunch of nasty little solutions on the manual page[1] that use pretty hairy regular
// expressions to get the job done, but I found a simple way to use PHP's unserialize and recurse
// through the string extracting all of the serialized bits along the way.
//
@chepsi
chepsi / gist:2f83b85bbcab08bbc35feba158fd43b2
Created April 23, 2024 09:33
Android254 Canvas Logo.
@Composable
fun InstagramLogo() {
Canvas(
modifier = Modifier
.size(200.dp)
.clip(RoundedCornerShape(10.dp))
) {
val width = size.width
val height = size.height
drawRoundRect(brush = InstaGradient)
@lmarkus
lmarkus / README.MD
Last active May 2, 2024 09:16
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...

@diogocapela
diogocapela / moment-js-timezones.txt
Created September 7, 2018 00:10
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@ZhekaiJin
ZhekaiJin / hierarchical_mutex.hpp
Created July 11, 2018 09:09
hierarchical_mutex
#include <iostream>
#include <thread>
#include <mutex>
#include <climits>
class hierarchical_mutex {
std::mutex internal_mutex;
unsigned long const hierarchy_value;
unsigned long previous_hierarchy_value;
static thread_local unsigned long this_thread_hierarchy_value;
@ddieppa
ddieppa / InstallChocolateyPackages.ps1
Last active May 2, 2024 09:12
My "must" chocolatey packages
function main {
Update-Windows-Configuration
Install-Utils
Install-Browsers
Install-Fonts
@gabe565
gabe565 / change-arc-icon.md
Last active May 2, 2024 09:12
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@JBlond
JBlond / bash-colors.md
Last active May 2, 2024 09:08 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple