Skip to content

Instantly share code, notes, and snippets.

View dungsaga's full-sized avatar
👻
ghost in the machine

DungSaga dungsaga

👻
ghost in the machine
View GitHub Profile
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@dungsaga
dungsaga / st4-changelog.md
Last active July 14, 2020 07:26 — forked from jfcherng/st4-changelog.md
Sublime Text 4 changelog just because it's not on the official website yet.
@dungsaga
dungsaga / Clear-WindowsInstallerPatchInfo.ps1
Created March 24, 2022 06:13 — forked from JohnLBevan/Clear-WindowsInstallerPatchInfo.ps1
Clear-WindowsInstallerPatchInfo; cleanly/safely remove files from c:\windows\installer
#based on
# - http://blogs.msdn.com/b/heaths/archive/2007/01/31/how-to-safely-delete-orphaned-patches.aspx
# - http://www.bryanvine.com/2015/06/powershell-script-cleaning-up.html
# - https://p0w3rsh3ll.wordpress.com/2012/01/10/working-with-the-windowsinstaller-installer-object/
clear-host
function Get-WindowsInstallerPatchInfo {
[CmdletBinding()]
Param ()
@dungsaga
dungsaga / DNS_TO_LOCALHOST.markdown
Created May 17, 2022 03:10 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

  • localhost - It will always works. Do you know why? I hope so.
  • [*.]fuf.me - Managed by @fidian; it will always point to localhost for IPv4 and IPv6
  • [*.]fbi.com - 👏 👏 👏 👏 👏
  • [*.]localtest.me
  • [*.]127-0-0-1.org.uk
  • [*.]vcap.me
@dungsaga
dungsaga / gist:a828c4e29e2e477281ac26932cb9da7d
Created May 17, 2022 03:12 — forked from rubensa/gist:407de76194d27f763cd5e8bd235fdd5d
Public DNS Pointing To localhost (127.0.0.1)

Available Wildcarded DNS Domains

It turns out that some kind hearted people already set up wildcarded domains for you already. You can use any top level domain below and any subdomain of these and they will always resolve back to 127.0.0.1 (your local machine). Here's the list of ones I know about. Let me know if there are more!

  • 127-0-0-1.org.uk
  • 42foo.com
  • beweb.com
  • domaincontrol.com
  • feacebook.com
  • fuf.me - Managed by @fidian; it will always point to localhost for IPv4 and IPv6
@dungsaga
dungsaga / merge.md
Created June 10, 2022 10:00 — forked from jt/merge.md
Merge a forked gist

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git://gist.github.com/1163142.git gist-1163142
    
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://gist.github.com/1164196.git
    
#Original command that was run
"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NonInteractive -NoProfile -Command "& {function Run-Server() { param([string]$h); $b = New-Object byte[] 8; $p = New-Object System.IO.Pipes.AnonymousPipeClientStream -ArgumentList @([System.IO.Pipes.PipeDirection]::In, $h); if ($p) { $l = $p.Read($b, 0, 8); while ($l -gt 7) { $c = [System.BitConverter]::ToInt32($b, 0); $l = [System.BitConverter]::ToInt32($b, 4); $t = $null; if ($l -gt 0) { $t1 = New-Object byte[] $l; $l = $p.Read($t1, 0, $t1.Length); $t = [System.Text.Encoding]::UTF8.GetString($t1, 0, $l) } if ($c -eq 1) { Invoke-Expression $t } elseif ($c -eq 9) { break } $l = $p.Read($b, 0, 8) } $p.Dispose() } } Run-Server -h 1860}"
#Deobfuscated command
"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NonInteractive -NoProfile -Command
# & is similar to Invoke-Expression except it will create an additional scope
& {
function Run-Server(){
#$h has a string value of 1860 passed from the below
@dungsaga
dungsaga / clojure-beginner.md
Created November 9, 2022 07:55 — forked from yogthos/clojure-beginner.md
Clojure beginner resources

Introductory resources

@dungsaga
dungsaga / System Design.md
Created November 9, 2022 08:01 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?