Skip to content

Instantly share code, notes, and snippets.

View sople1's full-sized avatar
๐Ÿ‹
:3

Seongsu Yoon sople1

๐Ÿ‹
:3
View GitHub Profile
// ==UserScript==
// @name ASTx2 Emulator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author @BawAppie
// @match https://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ahnlab.com
// @grant none
// ==/UserScript==
@rkttu
rkttu / meet-ie-again.ps1
Created June 16, 2022 06:18
Meet Internet Explorer Again ๐Ÿ˜
Add-Type 'public class SFW { [System.Runtime.InteropServices.DllImport("user32.dll")][return: System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Bool)] public static extern System.Boolean SetForegroundWindow(System.IntPtr hWnd); }'
$handle = [activator]::CreateInstance([type]::GetTypeFromCLSID("0002DF01-0000-0000-C000-000000000046"))
$handle.Visible = $true
$handle.Navigate('http://www.example.com/')
[SFW]::SetForegroundWindow($handle.HWND)
a=0
b=0
c=0
d=0
e=0
f=0
t=0
@julio-kim
julio-kim / scriptable-moduler.js
Created December 20, 2020 13:55
Scriptable Moduler
let fm = FileManager.iCloud()
let dir = fm.documentsDirectory()
const baseDirs = [`${dir}/modules`, `${dir}/modules/moduler`]
baseDirs.forEach(dir => {
if (!fm.isDirectory(dir)) {
fm.createDirectory(dir)
}
})
@masthoon
masthoon / launch_wsl.py
Created February 10, 2018 16:14
Launch a WSL process from Python (Windows)
import sys
import windows
import windows.winproxy
import windows.generated_def as gdef
# List distro: wslconfig /l
class WSLAPIProxy(windows.winproxy.ApiProxy):
APIDLL = "wslapi"
default_error_check = staticmethod(windows.winproxy.no_error_check)
@sweisgerber-dev
sweisgerber-dev / run-jekyll-localhost.sh
Last active March 22, 2018 19:26
Jetbrains Products (Webstorm, PHPStorm, IntelliJ) - Jekyll Run Script
#!/usr/bin/env bash
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
export PATH=:$PATH
export GEM_HOME=$(ruby -e 'print Gem.user_dir')
bundler exec jekyll s
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 19, 2026 23:55
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@roodkcab
roodkcab / gist:f1757a7aa7ab8ec67483
Created May 27, 2015 15:39
UIWebView JSContext
- (void)observeJSContext
{
CFRunLoopRef runLoop = CFRunLoopGetCurrent();
// This is a idle mode of RunLoop, when UIScrollView scrolls, it jumps into "UITrackingRunLoopMode"
// and won't perform any cache task to keep a smooth scroll.
CFStringRef runLoopMode = kCFRunLoopDefaultMode;
CFRunLoopObserverRef observer = CFRunLoopObserverCreateWithHandler
(kCFAllocatorDefault, kCFRunLoopBeforeWaiting, true, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity _) {
@davidmh
davidmh / config.fish
Last active November 28, 2020 13:37
Showing git branch in fish shell prompt. Put following code at the end of ~/.config/fish/config.fish. It will also highlight in red if branch is dirty. Based on http://zogovic.com/post/37906589287/showing-git-branch-in-fish-shell-prompt
set fish_git_dirty_color red
set fish_git_not_dirty_color green
function parse_git_branch
set -l branch (git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/\1/')
set -l git_status (git status -s)
if test -n "$git_status"
echo (set_color $fish_git_dirty_color)$branch(set_color normal)
else
@xero
xero / irc.md
Last active January 24, 2026 12:31
irc cheat sheet