Skip to content

Instantly share code, notes, and snippets.

@vildninja
vildninja / RemoveMissingScriptsRecursively.cs
Created March 25, 2019 10:06
Remove missing MonoBehaviour script components in Unity 2019.1 including visiting prefafab assets.
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEditor;
public static class FindMissingScriptsRecursively
{
[MenuItem("Auto/Remove Missing Scripts Recursively Visit Prefabs")]
private static void FindAndRemoveMissingInSelected()
{
// EditorUtility.CollectDeepHierarchy does not include inactive children
@artalar
artalar / client.ts
Last active April 27, 2024 19:50
reatomGql real example
import { fingerprint } from 'src/infrastructure/fingerprint';
import { Client, fetchExchange, makeOperation, mapExchange } from 'urql';
export const client = new Client({
url: '/api/graphql',
requestPolicy: 'network-only',
exchanges: [
mapExchange({
async onOperation(operation) {
return makeOperation(operation.kind, operation, {
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@rougier
rougier / nano-org-wip.el
Created April 27, 2024 13:45
GNU Emacs / N Λ N O org mode
;;; nano-org-wip.el --- N Λ N O org mode -*- lexical-binding: t -*-
;; Copyright (C) 2024 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
@Dziurwa14
Dziurwa14 / codes.md
Last active April 27, 2024 19:47
Discord error codes

Error Codes

All collected Discord error codes, categorized by type (first 2 digits).

Miscellaneous

Code Message
0 General error (such as a malformed request body, amongst other things)

Unknown API object

@bshafer
bshafer / CursorRecyclerAdapter.java
Last active April 27, 2024 19:47 — forked from Shywim/CursorRecyclerAdapter.java
A custom Adapter for the new RecyclerView, behaving like the CursorAdapter class from previous ListView and alike. Now with Filters and updated doc. I have incorporated updates and fixes from other forks and also replaced android.support.v7 with androidx.
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Matthieu Harlé
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@suuhm
suuhm / setup_openwrt_lxc_container_proxmox.sh
Last active April 27, 2024 19:46
Setup OpenWrt 23.05 LXC Container in Proxmox - Updated Version: 2024
#!/bin/bash
# Setting Up OpenWRT on a Virtual Machine with Proxmox
# Based on: https://community.bigbeartechworld.com/t/setting-up-openwrt-on-a-virtual-machine-with-proxmox/257
# Set your wished version:
export VER="23.05"
export ARCH="amd64"
export INDEX_URL="https://images.linuxcontainers.org/images/openwrt/$VER/$ARCH/default"
#export BUILDDATE=$(date -d "yesterday" '+%Y%m%d')
@mvaisakh
mvaisakh / Bringup.md
Last active April 27, 2024 19:46
An Android Device Tree Bringup Guide

A small Device Tree Bringup Guide

Introduction

So, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.

Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.

Prerequisite: Certain requirements are to be met before you start with this amazing journey.

@dev-zzo
dev-zzo / imperfect-design.md
Last active April 27, 2024 19:45
A curated list of research papers and blog posts on embedded security, keyed by the device p/n

The list below is compiled to inform, guide, and inspire budding security researchers. Oh and to pick something for bedtime reading too.

Included in the list are works on the following topics related to MCU/SoC security:

  • Secure boot
  • Fault injection
  • Side channel attacks

At the end of the list, there is also a section with links to articles of potential general interest, not addressing vulnerabilities in any specific device.

@Steven24K
Steven24K / ForceDirectedGraph.ts
Created March 26, 2020 14:38
A Force directed graph layouting algorithm based on Fruchterman and Reingold's principle, written in Typescript.
/**
* Force directed graph layout algorithm according to Fruchterman and Reingold's principle.
* The algorithm can be summarized as follows:
* algorithm SPRING(G:graph);
* place vertices of G in random locations;
* repeat N times
* calculate the force on each vertex;
* move the vertex c4
* draw graph on canvas, plotter or any drawing tool.
*