Skip to content

Instantly share code, notes, and snippets.

@haxpor
haxpor / cmake_v3.20.5_pdcurses.patch
Created August 8, 2021 11:53
Patch for CMake (v3.20.5) and PDCurses (3.9) for cross-compile with mingw64
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a2fcf2e372..ae32ce17b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -656,25 +656,12 @@ macro (CMAKE_BUILD_UTILITIES)
endif()
#---------------------------------------------------------------------
- # Use curses?
- if (UNIX)
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@MattRix
MattRix / PhysicsFollower.cs
Last active May 7, 2024 09:06
A thing you can use to make a rigidbody move towards a position reliably
using UnityEngine;
using System.Collections;
using System;
[RequireComponent (typeof(Rigidbody))]
public class PhysicsFollower : MonoBehaviour
{
public Transform target;
Rigidbody rb;

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@edokeh
edokeh / index.js
Last active May 7, 2024 09:05
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 7, 2024 09:05
Swift Concurrency Manifesto
# Please watch the tutorial to understand better - https://www.youtube.com/channel/UCBlphb6_k7X1P28OCYXMsWg
# In pubspec.yaml add
# geolocator: ^7.0.3
# geocoding:
# fluttertoast:
# In androidmanifest.xml add these before <application>
# <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@Faheetah
Faheetah / install.sh
Created September 15, 2023 16:30
Install containerd and nerdctl on Ubuntu
# Note: can also just install nerdctl-full
sudo apt-get update
sudo apt-get install containerd
wget https://github.com/containerd/nerdctl/releases/download/v1.5.0/nerdctl-1.5.0-linux-amd64.tar.gz
tar -zxf nerdctl-1.5.0-linux-amd64.tar.gz nerdctl
sudo mv nerdctl /usr/bin/nerdctl
rm nerdctl-1.5.0-linux-amd64.tar.gz
@rxaviers
rxaviers / gist:7360908
Last active May 7, 2024 09:02
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: