Skip to content

Instantly share code, notes, and snippets.

@h3ssan
h3ssan / JetBrains trial reset.md
Last active May 2, 2024 09:23
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 2, 2024 09:23
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@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)
@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