Skip to content

Instantly share code, notes, and snippets.

Karl kvpb

Block or report user

Report or block kvpb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kvpb
kvpb / script71.sh
Last active Jun 14, 2019
Test Script 71: BASH pseudorandom brute-force search
View script71.sh
#!/usr/bin/env bash
mkdir directory && cd directory
for i in {0..99}
do
> file${i}
printf "make file${i}\n"
done #for i in {0..0}{0..9}{0..9}; do > file${i}; echo file${i}; done
@kvpb
kvpb / gist:6254af4810e7f29de831fa0ed3aee7c5
Created Jun 8, 2019 — forked from samnang/gist:1759336
Install Bash version 4 on MacOS X
View gist:6254af4810e7f29de831fa0ed3aee7c5
# Install Bash 4 using homebrew
brew install bash
# Or build it from source...
curl -O http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
tar xzf bash-4.2.tar.gz
cd bash-4.2
./configure --prefix=/usr/local/bin && make && sudo make install
# Add the new shell to the list of legit shells
View PY0101EN-4-2-WriteFile.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvpb
kvpb / script70.sh
Last active May 13, 2019
Test Script 70: BASH pseudo-multidimensional array iteration over any dimension
View script70.sh
#!/usr/bin/env bash
# script70.sh
# Test Script 70: BASH pseudo-multidimensional array iteration over any dimension
#
# Karl 'Kabe' Bertin `kvpb`
# Phone number: +33xxxxxxxxx
# Email: local-part@domain
# LinkedIn: https://www.linkedin.com/in/karlbertin
# Facebook:
@kvpb
kvpb / download.sh
Created Apr 7, 2019 — forked from josh-padnick/download.sh
Download a private binary release file from GitHub in bash
View download.sh
#!/usr/bin/env bash
#
# This is an adaptation of code I wrote to download a private binary from GitHub. Such...pain.
# Why can't GitHub just offer a standardized URL you can download a release binary from and attach
# your Github Personal Access Token as a header?
#
# Since this code is an adaptation it hasn't been directly tested, but the code it was adapted from works
# and hopefully you can get the missing piece you're after by looking here.
#
@kvpb
kvpb / app-store-pkgs.sh
Created Apr 7, 2019 — forked from jacobsalmela/app-store-pkgs.sh
Save App Store downloads as .pkgs
View app-store-pkgs.sh
#!/bin/bash
appStoreFolder=$(sudo find /private/var/folders -type f -name "*.pkg")
i=0
for package in $appStoreFolder
do
sudo ln $package ~/Downloads/_MAS_$i.pkg
i=$(($i+1))
done
View gist:5fdfe74d7fce6a5a1bea72088779657c
.
├── autoload
│   ├── pathogen.vim
│   └── pathogen.vim.old
├── backup
├── bundle
│   ├── nerdcommenter
│   ├── scss-syntax.vim
│   ├── snipmate.vim
│   ├── supertab
@kvpb
kvpb / license.md
Created Apr 6, 2019
A license that applies to all of Karl Bertin's public gists. https://gist.github.com/kvpb
View license.md

MIT License

Copyright (c) 2014 Karl Bertin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR

@kvpb
kvpb / kbertins42header.txt
Created Apr 6, 2019
kbertin's 42 header, retrieved from an old file from one of the daily projects of the 2014 piscine.
View kbertins42header.txt
" **************************************************************************** "
" "
" ::: :::::::: "
" filename :+: :+: :+: "
" +:+ +:+ +:+ "
" By: kbertin <kbertin@student.42.fr> +#+ +:+ +#+ "
" +#+#+#+#+#+ +#+ "
" Created: YYYY/MM/DD HH:MM:SS by kbertin #+# #+# "
" Updated: YYYY/MM/DD HH:MM:SS by kbertin ### ########.fr "
" "
@kvpb
kvpb / Script.sh
Created Mar 14, 2018
Test script 69: Set macOS keyboard speed
View Script.sh
#!/usr/bin/env bash
# Script.sh
# Test script 69 [because I don't remember how many I did before, but I know I did about 50 anyway]: Set macOS keyboard speed
#
# Karl 'Kabe' Bertin (Карл Бэртин) `kvpb`
# Phone number: +33xxxxxxxxx
# Email: local-part@domain
# LinkedIn: https://www.linkedin.com/in/karlbertin
# Facebook: https://www.facebook.com/karlbertin
You can’t perform that action at this time.