Skip to content

Instantly share code, notes, and snippets.

import 'dart:async';
import 'dart:io';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
// #docregion platform_imports
// Import for Android features.
// import 'package:webview_flutter_android/webview_flutter_android.dart';
@zblurx
zblurx / lapsv2_decryptor.py
Last active April 24, 2024 06:42
Simple script to extract local admin password in cleartext with LAPSv2 using impacket
import argparse
import typing
import math
from uuid import UUID
from pyasn1.codec.der import decoder
from pyasn1_modules import rfc5652
from struct import unpack
from cryptography import utils
from cryptography.exceptions import AlreadyFinalized, InvalidKey
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
[
"1185030898148724777",
"956131521733984287",
"956097947727179806",
"1185045871478448242",
"932096380879667253",
"956246550152118374",
"928549000431407164",
"976786710836944936",
"956128945227567145",
@Geczy
Geczy / migrate.sh
Last active April 24, 2024 06:41
Migrate Coolify to a new server
#!/bin/bash
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys
# 1. Script must run on the source server
# 2. Have all the containers running that you want to migrate
# Configuration - Modify as needed
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server
destinationHost="server.example.com"
@CanOfColliders
CanOfColliders / split-skymap-into-images.py
Created July 15, 2013 10:08
Simple script to split a cubemap/skymap image produced by blender into 6 separated image files for use in Unity3Ds skybox materials.
#!/usr/bin/env python
# Will split a png cubemap/skymap image produced by blender into 6 separated image files for use in a skybox within unity
# Requires Python Imaging Library > http://www.pythonware.com/products/pil/
# The author takes no responsibility for any damage this script might cause,
# feel free to use, change and or share this script.
# 2013-07, CanOfColliders, m@canofcolliders.com
from PIL import Image
@kylebarron
kylebarron / convert.py
Last active April 24, 2024 06:38
preprocessing script for geoparquet on the web demo (https://observablehq.com/@kylebarron/geoparquet-on-the-web)
import geopandas as gpd
import pandas as pd
import pyarrow as pa
import pyarrow.feather as feather
import pyarrow.parquet as pq
import pygeos
import pyogrio
# https://ookla-open-data.s3.us-west-2.amazonaws.com/parquet/performance/type=mobile/year=2019/quarter=1/2019-01-01_performance_mobile_tiles.parquet
@Kreijstal
Kreijstal / PonyTown.js
Last active April 24, 2024 06:37
Hacks for not popular glorified chat called ponytown
//>implying whoever reads it can understand this
//Minified code from Rainb Essentials.
var genParser=function(e,t,n){function r(e,t){var n,r,i,a;return e?e instanceof RegExp?(i=new RegExp,i.compile("^(?:"+e.source+")",(e.multiline?"m":"")+(e.eturnignoreCase?"i":"")),n=i.exec(o.substr(s)),r=n&&n[0],null===r?null:(s+=r.length,r)):"string"==typeof e?e===o.substr(s,e.length)?(s+=e.length,e):null:(r=e.type,a=c[r],n=a(e,t),a?n:null):null}function i(e){return o=e,s=0,a.unknown(r(u))}var o,s,a=t,u={type:"type",is:n},c={expression:function(e){var t,n,i,o,s,a,u,c,l,p,f,h,d,g={type:"alternate",contains:[e.contains]},b={type:"alternate",contains:[]},y={type:"alternate",contains:[]},m=[],v=[];if(c=e.operators){for(t=0,i=c.length;i>t;t++)for(n=0,o=c[t].tokens.length;o>n;n++)a=c[t].tokens[n],e.whiteSpaceIgnore?"string"==typeof a?b.contains.push(new RegExp("\\s*(?:"+a.replace(/([-+\\?.!$^&*(){}[\]])/g,"\\$1")+")\\s*")):a instanceof RegExp?b.contains.push(new RegExp("\\s*(?:"+a.source+")\\s*",(a.multiline?"m":"")+(a.ignoreCa
@rowland007
rowland007 / UpstreamRepos.md
Created April 19, 2019 09:47
Describes how to add an upstream remote repo to your forked/cloned repo to get the latest updates.

Keep a Downstream git Repository Current with Upstream Repository Changes

A downstream repository (aka a “fork”) maintainer commonly needs to stay current with upstream work (aka "original"). The case is development continues on the upstream repo while you work on your own origin fork. You want to fetch the upstream changes and apply them to your origin so you don't make conflicts.

image cannot be displayed

The following steps allow you to achieve this on the command line in a local git repository.

Add the Remote Upstream Repository

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 24, 2024 06:35
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@JemCdo
JemCdo / columns_cheat_sheet.md
Created September 25, 2019 16:10 — forked from alphaolomi/columns_cheat_sheet.md
Laravel Migration Cheat Sheet

Columns

Available Column Types

The schema builder contains a variety of column types that you may specify when building your tables:

The schema builder contains a variety of column types that you may specify when building your tables:

Command` Description
$table->bigIncrements('id'); Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column.
$table->bigInteger('votes'); BIGINT equivalent column.