Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Pongstr pongstr

🏠
Working from home
View GitHub Profile
View .vimrc
" .vimrc
set nocompatible " Disable Vi compatibility
set backspace=indent,eol,start " Backspace through everything in INSERT mode
set ttyfast " Optimize for fast terminal connections
set nowrap " Disable word wrapping
set textwidth=0 wrapmargin=0 " Set textwidth + wrapmargin
set encoding=utf-8 nobomb " Use UTF-8 without BOM
set shiftwidth=2 " Use 2 spaces for indentation
set softtabstop=2 " Use 2 spaces for soft tab
View settings.json
{
"atomKeymap.promptV3Features": true,
"editor.tabSize": 2,
"editor.multiCursorModifier": "ctrlCmd",
"editor.fontFamily": "Consolas, Menlo, Monaco, 'Courier New', monospace",
"editor.tabCompletion": "onlySnippets",
"editor.lineHeight": 22,
"editor.scrollbar.verticalScrollbarSize": 5,
"editor.scrollbar.horizontalScrollbarSize": 5,
"editor.rulers": [
View setup_debian.sh
#!/bin/bash
echo "Updating Aptitude Source...."
sudo cat > /etc/apt/source.list << EOF
# deb cdrom:[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26]/ buster contrib main
# deb cdrom:[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26]/ buster contrib main
deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free
View _install_.sh
#!/bin/bash
# Set sources
echo '
## deb cdrom:[Debian GNU/Linux bullseye-DI-rc2 _Bullseye_ - Official Snapshot amd64 NETINST 20210607-15:56]/ bullseye main
## deb cdrom:[Debian GNU/Linux bullseye-DI-rc2 _Bullseye_ - Official Snapshot amd64 NETINST 20210607-15:56]/ focal main restricted
deb https://deb.debian.org/debian/ bullseye main contrib non-free
deb-src https://deb.debian.org/debian/ bullseye main contrib non-free
@pongstr
pongstr / aspect-ratio.scss
Last active Feb 5, 2020
Utilized for divs with background image that scales
View aspect-ratio.scss
// #==
// 4:3 Aspect Ratio
@mixin box-ratio-calc($width: ""){
@if ($width == "") {
width: 185px;
height: 118px;
} @else {
width: $width;
height: ($width / 4) * 3;
}
@pongstr
pongstr / breadcrumb.md
Created Jun 7, 2018
A simple Jekyll breadcrumb.
View breadcrumb.md

Jekyll Breadcrumb

A simple Jekyll breadcrumb without plugin.

{% capture url_tree %}
  {{ page.url | replace: '/', ' ' | strip }}
{% endcapture %}
@pongstr
pongstr / defer.js
Last active Oct 8, 2017
Deferring Image
View defer.js
(function () {
function onLoad() {
return function imageDefer() {
var defer = document.getElementsByTagName('img');
(defer && defer.length < 0) && Object.keys(defer).forEach(function (i) {
(defer[i].getAttribute('data-src')) &&
defer[i].setAttribute('src', defer[i].getAttribute('data-src'));
});
}
}
View Package Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"GitGutter",
"Package Control",
"SideBarEnhancements",
@pongstr
pongstr / bash.md
Last active Jul 24, 2017
Bash useful commands :D
View bash.md

dirs

# display the directory stack vertically, prefixing each
# entry with its index in the stack.
$ dirs -v

# cd and push the path to the directory stack.
$ pushd /path/to/directory
@pongstr
pongstr / docker-cleanup-resources.md
Created Jul 5, 2017 — 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