Skip to content

Instantly share code, notes, and snippets.

@johanntang
johanntang / WinDev.ps1
Created September 8, 2018 21:16 — forked from damieng/WinDev.ps1
Make Windows more developer-workstation oriented (includes removing crapware)
# Run this from Powershell as Administrator with (New-Object System.Net.WebClient).DownloadString("https://gist.github.com/damieng/881852e7112be7d97957/raw") | powershell -command -
Write-Output "Making Windows more developer oriented (Revision 26)..."
Set-ExecutionPolicy Unrestricted
if ([System.Environment]::OSVersion.Version.Major -ge 10) {
Write-Output " * Detected Windows 10"
Write-Output " * Removing Windows 10 bloatware"
$apps = @(
"Microsoft.3DBuilder"
@johanntang
johanntang / slacktheme
Last active June 1, 2018 18:12
Solarized Dark for Slack
/*
// First make sure the wrapper app is loaded
document.addEventListener("DOMContentLoaded", function() {
// Then get its webviews
let webviews = document.querySelectorAll(".TeamView webview");
// Fetch our CSS in parallel ahead of time
const cssPath = 'https://gist.githubusercontent.com/johanntang/e4d0c90e8a8ae7909cb38f5cfd3c8aec/raw/a490ee63a89e2bf5aa980aaba3cca44a04f38455/slacktheme';
let cssPromise = fetch(cssPath).then(response => response.text());
#SingleInstance force
#NoEnv
global uiDelay := 200
global transitionDelay := 1000
global middleScreenX := 620
global middleScreenY := 400
global resetAutoProgressX := 1246
global resetAutoProgressY := 145
# Initial Windows config
Install-WindowsUpdate -AcceptEula
Update-ExecutionPolicy Unrestricted
Disable-InternetExplorerESC
Disable-GameBarTips
Disable-MicrosoftUpdate
Enable-RemoteDesktop
Disable-BingSearch
Set-ExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
@johanntang
johanntang / 0_reuse_code.js
Created July 1, 2014 18:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console