Skip to content

Instantly share code, notes, and snippets.

View neur0manc's full-sized avatar

Stephan Brauer neur0manc

  • Oldenburg, Germany
  • 18:50 (UTC +02:00)
View GitHub Profile
@neur0manc
neur0manc / fizzbuzz.js
Created June 19, 2019 07:50
Eloquent JavasScript Rev.3 :: Chapter 2 :: FizzBuzzExercise
for (let i = 1; i <= 100; i += 1) {
let returnString = ""
if (i % 3 === 0) {
returnString += "Fizz"
}
if (i % 5 === 0) {
returnString += "Buzz"
}
console.log(returnString || `${i}`)
}
@neur0manc
neur0manc / checkerboard.js
Created June 19, 2019 07:46
Eloquent JavasScript Rev.3 :: Chapter 2 :: Checkerboard Exercise
const size = 8
let output = ""
let currentChar = "#"
for (let _ = 1; _ <= size; _ += 1) {
let line = ""
currentChar = currentChar === "#" ? " " : "#"
for (let __ = 1; __ <= size; __ += 1) {
line += currentChar
currentChar = currentChar === "#" ? " " : "#"
}
@neur0manc
neur0manc / Profile.ps1
Last active August 26, 2020 08:13
PowerShell config
# My profile file (a github gist)
$profileUri = "https://git.io/fh9CA"
# Where to put the profile file
if ($IsWindows) {
$profilePath = "~\Documents\PowerShell\Profile.ps1"
}
else {
$profilePath = "~/.config/powershell/profile.ps1"
}
@neur0manc
neur0manc / pchook.bash
Created October 16, 2016 20:18
Git-Hook to prevent committing code that still contains TODOs
#!/bin/bash
#
# Link this to .git/hooks/pre-commit
# and make sure this script is executable
# (I use `bash` instead of `sh` so I can color the error message)
result=$(grep -REin "// TODO|//TODO" * --exclude pchook.sh)
rc=$?
if [ $rc -eq 0 ]; then
echo -e "\e[31mDon't commit TODOs\e[0m"
@neur0manc
neur0manc / keybase.md
Last active October 5, 2017 12:27
Keybase.io Verification

Keybase proof

I hereby claim:

  • I am ls42 on github.
  • I am stephan (https://keybase.io/stephan) on keybase.
  • I have a public key ASAdQcw9k1ovBHRHzZcAF5FyAwGc5SJWDpN-QIk8GS5bDwo

To claim this, I am signing this object: