This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
ver | find "10." > nul | |
if errorlevel 1 ( | |
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^! | |
pause | |
exit | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Justin Miller 08/04/16 | |
# Setup auditd | |
# command example: | |
# aureport --tty | |
# | |
# to view root commands: | |
# ausearch -ue 0 | |
# to view user commands: | |
# ausearch -ua <userid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### OR take a look at | |
### https://github.com/HotCakeX/Harden-Windows-Security |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mholt [9:10 AM] | |
When using http.Get(), is it really necessary to read the full response body just to close it later? | |
[9:10] | |
The docs keep saying `Caller should close resp.Body when done reading from it.` and I keep seeing code like this: | |
``` | |
io.Copy(ioutil.Discard, resp.Body) | |
resp.Body.Close() | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.IO; | |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Collections.Generic; | |
using System.Collections; | |
public class FFMpegYUV4Texture : MonoBehaviour | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define STR2(x) #x | |
#define STR(x) STR2(x) | |
#ifdef _WIN32 | |
#define INCBIN_SECTION ".rdata, \"dr\"" | |
#else | |
#define INCBIN_SECTION ".rodata" | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Bitwise Mathematics Utilities | |
* | |
* A collection of fast bitwise operations for integer mathematics. | |
* These functions prioritize performance over readability and should be used | |
* when micro-optimizations are critical (game engines, real-time applications). | |
* | |
* References: | |
* - http://michalbe.blogspot.com.br/2013/03/javascript-less-known-parts-bitwise.html | |
* - http://jsperf.com/bitwise-vs-math-object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
try: | |
import gdb | |
inside_gdb = True | |
except ImportError: | |
inside_gdb = False | |
if inside_gdb: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
vars: | |
- kb_key: "com.apple.keyboard.modifiermapping" | |
- kb_map_dest: "HIDKeyboardModifierMappingDst" | |
- kb_map_src: "HIDKeyboardModifierMappingSrc" | |
tasks: | |
- shell: > | |
ioreg -p IOUSB -c IOUSBDevice | | |
grep -e class -e idVendor -e idProduct | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
vars: | |
- kb_key: "com.apple.keyboard.modifiermapping" | |
- kb_map_dest: "HIDKeyboardModifierMappingDst" | |
- kb_map_src: "HIDKeyboardModifierMappingSrc" | |
tasks: | |
- shell: > | |
ioreg -p IOUSB -c IOUSBDevice | | |
grep -e class -e idVendor -e idProduct | |