- using
pkgutil
# list all your installed packages
pkgutil --pkgs
# show your package info
pkgutil --pkg-info
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_opengl.h> |
// compile this like g++ go2.c -lgdi32 [if you're using mingw] | |
#include <windows.h> | |
#include <stdio.h> | |
// Helper function to retrieve current position of file pointer: | |
inline int GetFilePointer(HANDLE FileHandle){ | |
return SetFilePointer(FileHandle, 0, 0, FILE_CURRENT); | |
} | |
//--------------------------------------------------------------------------- |
/** | |
* = Recursive descent parser = | |
* | |
* MIT Style License | |
* By Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
* | |
* In this short lecture we'll cover the basic (non-predictive, backtracking) | |
* recursive descent parsing algorithm. | |
* | |
* Recursive descent is an LL parser: scan from left to right, doing |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
#include <stdio.h> | |
#include <Windows.h> | |
// based on: https://www.evilsocket.net/2014/02/11/on-windows-syscall-mechanism-and-syscall-numbers-extraction-methods/ | |
// author: @evilsocket | |
// modified by: @hasherezade | |
#define IS_ADDRESS_BETWEEN( left, right, address ) ( (address) >= (left) && (address) < (right) ) | |
PIMAGE_SECTION_HEADER SectionByRVA( PIMAGE_SECTION_HEADER pSections, DWORD dwSections, DWORD rva ) | |
{ |
#include <errno.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/ptrace.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
struct elf { |
#!/bin/sh | |
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh | |
# INSTALL | |
# | |
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh | |
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh | |
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC |
//https://twitter.com/fermatslibrary/status/937687947041701888 | |
use std::{thread, time}; | |
use std::sync::{Arc, Barrier}; | |
fn main() { | |
let elements = vec![9,8,7,6,5,4,3,2,1,0]; | |
sleep_sort(elements); | |
} | |
fn sleep_sort(dataset: Vec<i32>) { |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |