Skip to content

Instantly share code, notes, and snippets.

View lawrencedark's full-sized avatar

Lawrence Dark lawrencedark

View GitHub Profile
@lawrencedark
lawrencedark / Nodes.cpp
Created June 30, 2018 18:04 — forked from ChemistAion/Nodes.cpp
Prototype of standalone node graph editor for ImGui
// Prototype of standalone node graph editor for ImGui
// Thread: https://github.com/ocornut/imgui/issues/306
//
// This is based on code by:
// @emoon https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// @ocornut https://gist.github.com/ocornut/7e9b3ec566a333d725d4
// @flix01 https://github.com/Flix01/imgui/blob/b248df2df98af13d4b7dbb70c92430afc47a038a/addons/imguinodegrapheditor/imguinodegrapheditor.cpp#L432
#include "Nodes.h"
@lawrencedark
lawrencedark / firefox-assembly.sh
Created June 29, 2018 18:44
Lists asm files in source of Firefox Quantum
for f in *; do
(printf '%s ' "$f"; tokei $f | grep Assembly) |
grep Assembly |
awk '{print $4, $1}'
done
@lawrencedark
lawrencedark / ParameterSmoother.js
Created March 28, 2018 23:08
Parameter Smoother for rust-vst
// By @Boscop https://github.com/rust-dsp/rust-vst/issues/37 adapted from
// https://github.com/JordanTHarris/VAStateVariableFilter
use num_traits::Float;
use asprim::AsPrim;
use util::mix;
#[derive(Default)]
pub struct Smoother<F> {
cur: F,
@lawrencedark
lawrencedark / imguistyleserializer.cpp
Created January 29, 2018 03:53 — forked from Flix01/imguistyleserializer.cpp
imguistyleserializer
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
ImGuiStyle& style = ImGui::GetStyle();
style.Alpha = 1.0;
style.WindowFillAlphaDefault = 0.83;
style.ChildWindowRounding = 3;
style.WindowRounding = 3;
style.GrabRounding = 1;
style.GrabMinSize = 20;
style.FrameRounding = 3;
#pragma once
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders
namespace ImGui
{
inline void SetupImGuiStyle( bool bStyleDark_, float alpha_ )
{
@lawrencedark
lawrencedark / Extract-WiFi-Creds.ps1
Created October 5, 2017 23:42 — forked from gfoss/Extract-WiFi-Creds.ps1
Simple script to extract locally-stored Wi-Fi Credentials
#====================================#
# Extract Wi-Fi Credentials #
# greg . foss @ owasp . org #
# v0.1 -- July, 2017 #
#====================================#
# Licensed under the MIT License
<#
@lawrencedark
lawrencedark / Wlanpass.py
Created October 4, 2017 09:44 — forked from ToxicProxy/Wlanpass.py
Wifi Passwords
import subprocess
import re
# List of Wlan interfaces connected before/frequently
cmd = subprocess.Popen('netsh wlan show profiles', shell=True, stdout=subprocess.PIPE)
ssids = [];
for line in cmd.stdout:
line = line.strip()
searchObj = re.search( ': ', line, re.M|re.I)
@lawrencedark
lawrencedark / LinuxPrivEsc.sh
Created October 4, 2017 08:43 — forked from 1N3/LinuxPrivEsc.sh
Linux Privilege Escalation Script by 1N3 @CrowdShield - https://crowdshield.com
#!/bin/sh
#
# `7MN. `7MF'
# __, MMN. M
#`7MM M YMb M pd""b.
# MM M `MN. M (O) `8b
# MM M `MM.M ,89
# MM M YMM ""Yb.
#.JMML..JML. YM 88
# (O) .M'
@lawrencedark
lawrencedark / mangle
Created May 14, 2017 02:01 — forked from alphapapa/mangle
Mangle man pages to show just the parts you need (suitable for aliasing to "man")
#!/bin/bash
less_command='| less $less_no_init -aiF -Ps"Manual page\: $man_page (?ltline %lt?L/%L.:byte %bB?s/%s..? (END):?pB %pB\%..)"'
# Get section
if [[ $1 =~ [0-9]+ ]]
then
section=$1
shift
fi