Skip to content

Instantly share code, notes, and snippets.

@pbojinov
pbojinov / canada_states_titlecase.json
Last active May 18, 2024 17:28 — forked from mshafrir/states_hash.json
US states & Canadian Provinces in JSON form
[
{
"name": "Alberta",
"abbreviation": "AB"
},
{
"name": "British Columbia",
"abbreviation": "BC"
},
{
@gspencergoog
gspencergoog / main.dart
Created March 10, 2020 17:16
InheritedNotifier example
// Flutter code sample for
// This example shows three spinning squares that use the value of the notifier
// on an ancestor [InheritedNotifier] (`SpinModel`) to give them their
// rotation. The notifier doesn't need to know about the children, or need to
// be an animation controller, however. The `SpinModel` class could just as
// easily listen to another object (say, a separate object that keeps the
// value of a slider) that was a [Listenable], and get the value from that. The
// descendants also don't need to have an instance of the [InheritedNotifier]
// in order to use it, they just need to know that there is one in their
@rizky201008
rizky201008 / MainActivity.kt
Created May 18, 2024 17:24
How to play music using jetpack compose and also show music progress in Linear progress indicator
package com.vixiloc.soundeffectplayer
import android.content.ContentValues.TAG
import android.media.MediaPlayer
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Box
@simonw
simonw / recover_source_code.md
Last active May 18, 2024 17:24
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@queengooborg
queengooborg / essentials-worth.yml
Last active May 18, 2024 17:17
A balanced worth.yml file for Bukkit/Spigot servers running 1.13.x+ with EssentialsX
#
# Minecraft Essentials worth.yml - optimized for an ideal balanced Economy!
# https://gist.github.com/queengooborg/92d08120f0d6d25175f6c7a30e3ccac7
#
# Compatible MC Version: 1.13.x+
# Latest MC Version: 1.20.x
#
# Maintained by Vinyl Da.i'gyu-Kazotetsu [https://www.queengoob.org]
# Generated by https://github.com/queengooborg/mc-toolkit
# Initialy created by X00LA: https://github.com/X00LA/Bukkit-Essentials-worth.yml
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 18, 2024 17:15
Files for PlayStation BIOS Files NA-EU-JP
@tomdaley92
tomdaley92 / README.md
Last active May 18, 2024 17:15
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@zeljic
zeljic / build_sqlite3_lib.md
Last active May 18, 2024 17:12
Build SQLite3 .lib file on windows

How to build SQLite3 .lib file on Windows 10

  1. Download source from source

    For example: source https://www.sqlite.org/2023/sqlite-amalgamation-3430100.zip

  2. Download binary from binary

    For example: binary https://www.sqlite.org/2023/sqlite-dll-win64-x64-3430100.zip

  3. Extract both archives to the same directory

import React, { useState, useEffect } from 'react';
import { View, Text } from 'react-native';
import { ApolloProvider } from '@apollo/client';
import NetInfo from '@react-native-community/netinfo';
import QueueLink from 'apollo-link-queue';
import AsyncStorage from '@react-native-community/async-storage';
import { getApolloClient } from '../apollo/apolloClient';
import NoteView from './NoteView';