Skip to content

Instantly share code, notes, and snippets.

Timi Aiyemo cozzbie

Block or report user

Report or block cozzbie

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
View macapps.sh
## Installs for a new Mac
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew cask install google-chrome appcleaner hyper docker visual-studio-code keka google-backup-and-sync dropbox adware-removal-tool
brew cask install skype
brew install fish node python
## setup fish as default
sudo cat /usr/local/bin/fish >> /etc/shell
View ng-scss.sh
# Manually change from css to scss:
ng config schematics.@schematics/angular:component.styleext scss
# From scratch:
ng new <project-name> --style=scss
# Set global default
ng config --global defaults.styleExt=scss
@cozzbie
cozzbie / code.bash
Last active Jun 12, 2019
code extensions
View code.bash
# code --list-extensions | xargs -L 1 echo code --install-extension
code --install-extension asvetliakov.snapshot-tools
code --install-extension auchenberg.vscode-browser-preview
code --install-extension cazzar09.Gradle
code --install-extension christian-kohler.npm-intellisense
code --install-extension christian-kohler.path-intellisense
code --install-extension chrmarti.regex
code --install-extension CoenraadS.bracket-pair-colorizer
code --install-extension Dart-Code.dart-code
code --install-extension Dart-Code.flutter
View raspbian_setup.file
# recovery.cmdline
silentinstall
# /os/Raspbian/partition_setup.sh
# Enable SSH
echo 'ssh' >/tmp/1/ssh
# Configure WiFi
echo 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev' >> /tmp/1/wpa_supplicant.conf
View selecttxt.js
const selection = window.getSelection();
const range = document.createRange();
const element = document.getElementById('elmt');
// Collect a range based off the contents of an element.
range.selectNodeContents(element);
// Clear ranges that might be stored in the selection object.
selection.removeAllRanges();
selection.addRange(range);
View intToBase2.js
let convertIntToBase2 = (n, p) => {
p += n % 2;
return n <= 0 ? p.split('').reverse().join('') : convertIntToBase2(parseInt(n / 2), p);
}
@cozzbie
cozzbie / bash.cheat
Created Jul 6, 2018 — forked from afair/bash.cheat
Bash Scripting Quick Reference
View bash.cheat
==========================================
BASH SCRIPTING ==========================================
========================================== TEST COMMAND
==========================================
Invoke: bash [options] file
Shebang: #!/usr/bin/env bash Test: test expression
In script: [ expression ]
========================================== Alternate: [[ espression ]]
LOOP Does not split string words
========================================== Does not expand pathglobs*
@cozzbie
cozzbie / docker-cleanup-resources.md
Created Jul 2, 2018 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
View Dockerfile
FROM docker.io/node:8-stretch
LABEL net.skyplabs.maintainer-name="Paul-Emmanuel Raoul"
LABEL net.skyplabs.maintainer-email="skyper@skyplabs.net"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends chromium
You can’t perform that action at this time.