This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName System.Runtime.WindowsRuntime | |
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0] | |
function Await($WinRtTask, $ResultType) { | |
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType) | |
$netTask = $asTask.Invoke($null, @($WinRtTask)) | |
$netTask.Wait(-1) | Out-Null | |
$netTask.Result | |
} | |
$null = [Windows.ApplicationModel.DataTransfer.Clipboard, Windows.ApplicationModel.DataTransfer, ContentType=WindowsRuntime] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install scoop for other packages | |
# Need to use job since scoop installer can just {exit 1} | |
Start-Job -ScriptBlock { | |
Invoke-WebRequest -useb 'get.scoop.sh' | Invoke-Expression -ErrorAction SilentlyContinue | |
} | Wait-Job | Receive-Job | |
if (!(Get-Command 'git' -ErrorAction SilentlyContinue)) | |
{ | |
scoop install git | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --single-branch --depth=1 https://github.com/emacs-mirror/emacs.git | |
cd emacs/ | |
sudo apt install -y autoconf make gcc texinfo libxpm-dev \ | |
libjpeg-dev libgif-dev libtiff-dev libpng-dev libgnutls28-dev \ | |
libncurses5-dev libjansson-dev libharfbuzz-dev | |
./autogen.sh | |
./configure --with-json --with-modules --with-harfbuzz --with-compress-install \ | |
--with-threads --with-included-regex --with-zlib --with-cairo --without-rsvg\ | |
--without-sound --without-imagemagick --without-toolkit-scroll-bars \ | |
--without-gpm --without-dbus --without-makeinfo --without-pop \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package async | |
:ensure t | |
:defer 5 | |
:init | |
(setq async-bytecomp-allowed-packages '(all)) | |
:config | |
;; async compiling package | |
(async-bytecomp-package-mode t) | |
(dired-async-mode 1) | |
;; limit number of async processes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
import random | |
def rnd04(): | |
return random.randint(0,4); | |
def rnd03(): | |
rnd = rnd04() | |
while rnd > 3: |