Skip to content

Instantly share code, notes, and snippets.

View wizofe's full-sized avatar
😬
Focusing

Ioannis Valasakis wizofe

😬
Focusing
View GitHub Profile
@wizofe
wizofe / DevBoxStarter.ps1
Last active December 9, 2022 10:57 — forked from myty/DevBoxStarter.ps1
DevBoxStarter
# POWERSHELL
Update-ExecutionPolicy Unrestricted
# Install Chocolatey
if ((Get-Command "choco" -ErrorAction SilentlyContinue) -eq $null)
{
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
function Invoke-RefreshEnvironment {
@wizofe
wizofe / python2pdf.sh
Last active August 15, 2019 15:04 — forked from smoitra87/python2pdf.sh
Convert python files to pdf and concatenate all pdfs. Requires pygmentize, pdflatex and pdftk
#!/bin/sh
# Run as ./python2pdf.sh $(ls *.py)
# For Debian the requirements are
# sudo apt install pdftk python3-pygments texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
outdir=${HOME}/tmp
mkdir ${outdir}
allpdfs=""
@wizofe
wizofe / python2pdf.sh
Created August 15, 2019 15:02 — forked from smoitra87/python2pdf.sh
Convert python files to pdf and concatenate all pdfs. Requires pygmentize, pdflatex and pdftk
#!/bin/sh
allpdfs=""
for f in "$@" ; do
filename=$(basename "$f")
filename="${filename%.*}"
pygmentize -f tex -O linenos -O title=$( echo $filename | tr '_' '-').py -O full -O style=default -o /tmp/$filename.tex $f
pdflatex -jobname=$filename -output-directory=/tmp /tmp/$filename.tex
allpdfs="$allpdfs /tmp/$filename.pdf"
@wizofe
wizofe / gist:8726a97b2fbba66ecf2f31962d6f0ffa
Created April 12, 2019 00:45 — forked from todgru/gist:4128695
Git Keeps asking for username password clone ssh git https