Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdint.h>
char segoverride[4] = "";
char buffer[100];
#define parse_mod_reg_rnm \
fread(&b, 1, 1, f); \
int mod = (b >> 6) & 0x03; \
int reg = (b >> 3) & 0x07; \
@sxiii
sxiii / remove.sh
Created October 5, 2020 05:35
Docker Swarm - Remove all Down nodes automatically
#!/bin/bash
# Requirements: linux, docker, grep, awk
# This script removes all "Down" (off) nodes from Docker Swarm
# Useful to clean stuff from time to time, if you have auto-joining nodes for example
sudo docker node rm $(sudo docker node ls | grep Down | awk -F" " '{ print $1 }')
@jofese
jofese / automata-con-pila.cpp
Created November 10, 2014 04:41
Implementacion de Un automata con Pila en c++
/*
Autor: Joel Cesar Fernandez Segura
Curso: Tecnicas De Construccion de Programas
Ejercicio: Implementacion de un Automata Con Pila
IDE: CodeBlocks
Pagina Web: http://codebotic.blogspot.com
*/
#include<iostream>
#include<cstdlib>
@tadeumesquita
tadeumesquita / Jurimetria FDRP
Last active May 3, 2024 01:15
Scripts gerados durante o curso de Jurimetria aplicada em estudos sobre direito e desigualdades - FDRP/USP
#Jurimetria aplicada em estudos sobre direito e desigualdades
Upload files to Google Drive using Google Apps Script Web Apps and save records in Google Sheets.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 01:01
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@jboner
jboner / latency.txt
Last active May 3, 2024 01:00
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@x-yuri
x-yuri / Generating SSL certificates.md
Last active May 3, 2024 00:59
Generating SSL certificates

Generating SSL certificates

req:

openssl req -x509 -subj /CN=root.yourdomain.com -days 3650 -noenc \
    -out root.crt -keyout root.key
  # -x509 - generate a certificate
  # -subj - subject
  # -days - validity period
@jinjier
jinjier / 250.csv
Last active May 3, 2024 00:55
JavDB Top 250 movies code list. [Updated at 2024/02]
1 LAFBD-41
2 SSNI-497
3 ABP-984
4 IPX-580
5 IPX-811
6 IPX-177
7 STARS-804
8 SMBD-115
9 ABP-968
10 ABF-017
@luncliff
luncliff / cmake-tutorial.md
Last active May 3, 2024 00:53
CMake 할때 쪼오오금 도움이 되는 문서

CMake를 왜 쓰는거죠?
좋은 툴은 Visual Studio 뿐입니다. 그 이외에는 전부 사도(邪道)입니다 사도! - 작성자

주의

  • 이 문서는 CMake를 주관적으로 서술합니다
  • 이 문서를 통해 CMake를 시작하기엔 적합하지 않습니다
    https://cgold.readthedocs.io/en/latest/ 3.1 챕터까지 따라해본 이후 기본사항들을 속성으로 익히는 것을 돕기위한 보조자료로써 작성되었습니다