Skip to content

Instantly share code, notes, and snippets.

@bmatcuk
bmatcuk / create-usb.sh
Created May 30, 2019 04:38
Creating a Bootable Windows USB from ISO on a Mac
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
# This will output a bunch of info about all of the disk drives connected to
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is
# some number starting at 0. Now, insert your USB drive and run the command
# again. You should see a new entry. Make note of the name (ie, /dev/diskX).
diskutil list
@AidanSun05
AidanSun05 / DockBuilderExample.cpp
Created February 5, 2022 00:29
A commented example for Dear ImGui's DockBuilder API.
// The DockBuilder API is still marked as experimental, include Dear ImGui's internal header to pull the functions in:
#include "imgui_internal.h"
// [...]
// Beginning of main loop
// 1. DockBuilder functions only need to run once to take effect.
// This state variable will let us check for the first frame of the app.
static bool firstLoop = true;
@gilbertotoledo
gilbertotoledo / got-docker-traefik-portainer.md
Last active December 29, 2024 06:37
Configurando Portainer e Traefik

Configurando o Portainer e Traefik

Autor: Gilberto Toledo
Tutorial completo: Youtube

1. Criando uma rede pública no Docker

docker network create web
#version 300 es
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
out vec4 fragColor;
uniform vec2 resolution;
uniform vec3 orientation;
@jinjier
jinjier / javdb-top250.md
Last active December 29, 2024 06:33
JavDB top 250 movies list. [Updated on 2024/12]
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active December 29, 2024 06:32
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

@jamiephan
jamiephan / README.md
Last active December 29, 2024 06:30
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active December 29, 2024 06:29
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@daif
daif / iban.php
Created February 21, 2019 13:54
Check IBAN number
<?php
/**
* Value should be an IBAN number
*
*
* @param string
* @return bool
*/
function iban($str)
{
@daif
daif / file_cache_contents.php
Created January 4, 2017 16:50
Tiny Cache system
<?php
//Tiny Cache system
function file_cache_contents($url, $cache_time=360000) { // 60*60*5
$cache_dir = __DIR__.'/cache/';
$cache_file = $cache_dir.md5($url).'.cache';
@mkdir($cache_dir, 0775, true);
// return data from cached file if file exists and not expired
if(file_exists($cache_file) && filemtime($cache_file)+$cache_time >= time()) {
return(unserialize(file_get_contents($cache_file)));
}