Skip to content

Instantly share code, notes, and snippets.

View pongstr's full-sized avatar
:octocat:

pongstr pongstr

:octocat:
View GitHub Profile
@pongstr
pongstr / create-ssl.md
Last active July 18, 2023 20:57
Create a Self-signed certificate and add it to macOS Keychain

How to use

## Download the create-ssl.sh file
curl -L -o create-ssl.sh https://gist.githubusercontent.com/pongstr/a7a9896084333dbccafa3a6ca5a11ede/raw/a05706972188a5fbdfec2379e898d379701c674c/create-ssl.sh

## make it executable 
chmod +x ./create-ssl.sh

## and run it. follow the prompts and it will generate the ssl certificate
{
"name": "DZ60RGB ANSI V2",
"vendorProductId": 1146753569,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_GESC",
"KC_1",
"KC_2",
"KC_3",
@pongstr
pongstr / tm.sh
Last active February 7, 2022 21:08
un-throttle TimeMachine Backups
#!/bin/zsh
## Unthrottle timemachine backup, if backups are important
## why throttle the speed? apple.
sudo sysctl debug.lowpri_throttle_enabled=0
@pongstr
pongstr / .vimrc
Last active August 17, 2020 21:10
" .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
{
"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": [
#!/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
@pongstr
pongstr / _install_.sh
Last active January 17, 2024 20:28
Debian Stuff
#!/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 February 5, 2020 09:02
Utilized for divs with background image that scales
// #==
// 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 June 7, 2018 16:47
A simple Jekyll breadcrumb.

Jekyll Breadcrumb

A simple Jekyll breadcrumb without plugin.

{% capture url_tree %}
  {{ page.url | replace: '/', ' ' | strip }}
{% endcapture %}
@pongstr
pongstr / defer.js
Last active October 8, 2017 12:27
Deferring Image
(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'));
});
}
}