Skip to content

Instantly share code, notes, and snippets.

View timlyo's full-sized avatar

Tim timlyo

View GitHub Profile
Even Newer Firewall Config
@timlyo
timlyo / manifest.json
Last active October 10, 2023 19:00
manifest.json
{
"manifest_version": 1,
"manifest_sequence_id": 1,
"manifest_generate_timestamp": "2023-09-14T14:49:00Z",
"id": {
"unit_id": "0000123",
"serial_number": 123,
"secapp_mode": "IT"
},
"inventory": {
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Windows.Forms.X11Keyboard.Xutf8LookupString (intptr,System.Windows.Forms.XEvent&,byte[],int,intptr&,System.Windows.Forms.XLookupStatus&) <0x000a4>
at System.Windows.Forms.X11Keyboard.LookupString (System.Windows.Forms.XEvent&,int,System.Windows.Forms.XKeySym&,System.Windows.Forms.XLookupStatus&) <0x000c3>
at System.Windows.Forms.X11Keyboard.EventToVkey (System.Windows.Forms.XEvent) <0x0003f>
at System.Windows.Forms.X11Keyboard.ToUnicode (int,int,string&) <0x0035f>
at System.Windows.Forms.X11Keyboard.TranslateMessage (System.Windows.Forms.MSG&) <0x00127>
at System.Windows.Forms.XplatUIX11.TranslateMessage (System.Windows.Forms.MSG&) <0x00023>
at System.Windows.Forms.XplatUI.TranslateMessage (System.Windows.Forms.MSG&) <0x0001f>
pub fn greedy(set: &HashSet<u32>, target: u32) -> bool {
let mut subset: HashSet<u32> = HashSet::new();
let mut set = set.clone();
while subset.iter().sum::<u32>() < target {
if set.is_empty(){
break;
}
let max = set.iter().max().unwrap().clone();
if subset.iter().sum::<u32>() + max <= target{
code = "2fa80,1f080be,1123aa2,11083a2,11343a2,1f17cbe,14a80,3fb8cff,c7155,274badd,17cf554,3747b6e,1dec108,1dec108,1647a55,1504104,1043e0e,19e7a0b,3f908e7,176a8,1f308e6,1117809,1118320,1107372,1f13a06,7380"
for thing in code.split(","):
print(format(int(thing, 16) + 262144, "026b").replace("1", " ").replace("0", u"\u2588" * 2))
@timlyo
timlyo / gist:fade51ddeecfca8cc56d
Created May 18, 2014 15:18
FindCEGUI.cmake module
# - Locate CEGUI LIBRARIES
# This module defines
# CEGUI_FOUND, if false, do not try to link to CEGUI
# CEGUI_INCLUDE_DIR, where to find headers.
# CEGUI_LIBRARIES, the LIBRARIES to link against
# CEGUI_BINARY_REL - location of the main CEGUI binary (win32 non-static only, release)
# CEGUI_BINARY_DBG - location of the main CEGUI binaries (win32 non-static only, debug)
#
#
# Modules :