Skip to content

Instantly share code, notes, and snippets.

View oskaryil's full-sized avatar
🛠️
Building things

Oskar Yildiz oskaryil

🛠️
Building things
View GitHub Profile
import networkx as nx
def diffuse_information(G: nx.MultiGraph, seed: list, case='best_case'):
informed_nodes = {n: None for n in seed}
needs_update = True
while needs_update:
needs_update = False
for u, v, dt in G.edges(nbunch=informed_nodes, data='diffusion_time'):
if u in informed_nodes:
@arogulin
arogulin / VortexRace3ForMac.md
Last active March 19, 2025 12:19
How to setup Vortex Race 3 keyboard for Mac and move Fn key to Home

How to setup Vortex Race 3 for Mac with latest (on 2020-01-05) firmare V1.02.05.

For better understanding we will use the following naming convention:

  [ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
  1. Reset everything by pressing L3+R1 for 5 seconds. Left LED will blink white color while you're holding the keys. Release them after it stopeed blinking.
  2. Get into one of the programmable layers (R2+RShift) – I like red, the super bright laser LED is the least super annoying in red.
  3. Put the keyboard in Windows Mode (Pn+W), it's the least problematic one.
@whiskerz007
whiskerz007 / gist:53c6aa5d624154bacbbc54880e1e3b2a
Last active October 1, 2025 03:52
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script
PLUGINS:
- eamodio.gitlens
- esbenp.prettier-vscode
- icrawl.discord-vscode
- midnightsyntax.vscode-wrap-console-log
- mikestead.dotenv
- monokai.theme-monokai-pro-vscode
- ms-python.python
- ms-vsliveshare.vsliveshare
- wix.vscode-import-cost
@MakiseKurisu
MakiseKurisu / setup.sh
Last active October 6, 2025 20:48
Proxmox VE 6 GPU Passthrough
#!/bin/bash
# Reference guides:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
# https://pve.proxmox.com/wiki/Pci_passthrough
# https://pve.proxmox.com/wiki/Nested_Virtualization
# Remember to turn on SVM in BIOS and disable CSM
# Update packages
@IllDepence
IllDepence / token.html
Created June 27, 2018 03:02
web ui for getting firebase id tokens for testing
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.firebase.com/libs/firebaseui/2.5.1/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/2.5.1/firebaseui.css" />
</head>
<body>
@jylopez
jylopez / stripe_country_codes.js
Last active October 19, 2025 22:08
Stripe Country Codes
[
{ code: 'AU', name: 'Australia' },
{ code: 'AT', name: 'Austria' },
{ code: 'BE', name: 'Belgium' },
{ code: 'BR', name: 'Brazil' },
{ code: 'BG', name: 'Bulgaria' },
{ code: 'CA', name: 'Canada' },
{ code: 'HR', name: 'Croatia' },
{ code: 'CY', name: 'Cyprus' },
{ code: 'CZ', name: 'Czech Republic' },
@lukas-zech-software
lukas-zech-software / GeoCodingService.ts
Last active April 9, 2021 21:56
Typescript Definitions for official GoogleMaps API for Node.js (https://github.com/googlemaps/google-maps-services-js)
import { createClient, GoogleMapsClient } from '@google/maps';
export class GeoCodingService {
private geoCoder: GoogleMapsClient;
public constructor() {
this.geoCoder = createClient({
key: 'YOUR-API-KEY',
});
@fdidron
fdidron / App.js
Last active September 26, 2025 04:26
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@SkaTeMasTer
SkaTeMasTer / basic-bind.sh
Created October 5, 2016 20:14
DNS Server -- Simple script to generate a basic bind configuration for home/lab use
#!/bin/bash
#
# Simple script to generate a basic bind configuration for home/lab use
#
# Local config - adjust as required
OWNIP=192.168.111.3
NETWORK=192.168.111.0
NETMASK=/24
DNS1=192.168.111.1