Skip to content

Instantly share code, notes, and snippets.

@joshuatee
joshuatee / Socks5.cs
Created April 16, 2020 06:41 — forked from zHaytam/Socks5.cs
A Socks5 implementation in .NET Core (C# 8)
using System;
using System.Globalization;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace Socks
{
public static class Socks5
@joshuatee
joshuatee / breachcompilation.txt
Created August 6, 2019 12:23
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:
@joshuatee
joshuatee / 🐙.ps1
Created October 7, 2018 14:02 — forked from IISResetMe/🐙.ps1
CthulhuShell
function 🐙 {
$name,$params = $args.Where({$_ -eq '💩'},'Until')
$null,$body = $args.Where({$_ -eq '💩'},'SkipUntil')
$params = @($params |? {$_})
$func = @"
param($(($params |% {"`${$_}"})-join','))
$(($params |% {$body = $body -replace "($([regex]::Escape($_)))",'(&$${$1})'}))
@joshuatee
joshuatee / Image.cs
Created January 29, 2018 14:46 — forked from ecnepsnai/Image.cs
Bing Image of the Day
// Bing Image of the Day for C#
// If you're using this in your project, give this gist a 'Star'!
// Made by Ian Spence with <3 in Vancouver, British Columbia, Canada
using System;
using System.Xml;
using System.Net;
public Uri GetImage() {
if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() == false) {
@joshuatee
joshuatee / README.md
Created January 25, 2018 09:46 — forked from marfillaster/README.md
WSL Desktop Launched i3wm

WSL Desktop Launched i3wm

Requirements VcXsrv, i3wm in wsl.

The three files below must be stored in the same directory (%UserProfile%\Desktop).

  • i3.vbs - This is the entrypoint script. It runs i3.bat in the background.
  • i3.bat - Runs VcXsrv using d0.xlaunch profile then starts i3
  • d0.xlaunch - VcXsrv in "One window without titlebar" mode at DISPLAY=:0
@joshuatee
joshuatee / App.tsx
Created March 17, 2017 06:28
react-hot-loader 3 + TypeScript
import * as React from "react"
const App = () =>
<div/>
export {App as default}
@joshuatee
joshuatee / submodules.sh
Created September 18, 2016 10:05 — forked from andrezrv/submodules.sh
Using Git submodules.
# CREATE: On the root folder of a Git repository:
$ git submodule add git@bitbucket.org:nicethemes/<repo>.git location/of/submodule
# Cloning a repo that contains submodules:
$ git clone --recursive git@bitbucket.org:nicethemes/<repo>.git location/of/repo
# Or:
$ git clone git@bitbucket.org:nicethemes/<repo>.git location/of/repo
$ git submodule init
$ git submodule update
@joshuatee
joshuatee / Client.cs
Created September 7, 2016 08:26 — forked from leandrosilva/Client.cs
Asynchronous Client/Server Socket Example with C# (from MSDN library)
// Asynchronous Client Socket Example
// http://msdn.microsoft.com/en-us/library/bew39x2a.aspx
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Text;
// State object for receiving data from remote device.
@joshuatee
joshuatee / ToastNotification-Sample.ps1
Created May 28, 2016 23:04 — forked from guitarrapc/ToastNotification-Sample.ps1
toast sample in PowerShell not yet finished;
# Code conversion from C# to PowerShell
# http://msdn.microsoft.com/en-us/library/windows/apps/hh802768.aspx
# nuget Windows 7 API Code Pack -Shell
# http://nugetmusthaves.com/Package/Windows7APICodePack-Shell
# Install-Package Windows7APICodePack-Shell
Add-Type -Path .\Microsoft.WindowsAPICodePack.dll
Add-Type -Path .\Microsoft.WindowsAPICodePack.Shell.dll
# create toast template TO xml
@joshuatee
joshuatee / Invoke-ElevatedCommand.ps1
Created December 8, 2015 21:57 — forked from TaoK/Invoke-ElevatedCommand.ps1
Invoke-ElevatedCommand for Administrator-level commands in a common powershell pipeline
Function Invoke-ElevatedCommand {
<#
.DESCRIPTION
Invokes the provided script block in a new elevated (Administrator) powershell process,
while retaining access to the pipeline (pipe in and out). Please note, "Write-Host" output
will be LOST - only the object pipeline and errors are handled. In general, prefer
"Write-Output" over "Write-Host" unless UI output is the only possible use of the information.
Also see Community Extensions "Invoke-Elevated"/"su"
.EXAMPLE