Skip to content

Instantly share code, notes, and snippets.

View 001101's full-sized avatar

PCM 001101

View GitHub Profile
@001101
001101 / dawn2dusk.js
Created August 8, 2021 13:49 — forked from HendrikRunte/dawn2dusk.js
Scriptable.app widget displaying the exact time of today's sunrise and sunset. Which comes in handy in the wintertime …
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: sun;
///////////////////////////////////////////////////////////////////////
// dawn2dusk.js
// Origin:
// https://gist.github.com/HendrikRunte/4b5d03cb26e31508bc96553ad3c10f47
// Take it and have fun.
// Hendrik Runte, Nov 12, 2020, 17:33.
@001101
001101 / tmux-cheatsheet.markdown
Created September 9, 2020 20:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@001101
001101 / git-compressing-and-deltas.md
Created May 24, 2020 19:06 — forked from matthewmccullough/git-compressing-and-deltas.md
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo:

@001101
001101 / Laravel on VestaCP.md
Created October 22, 2019 18:15 — forked from peterbrinck/Laravel on VestaCP.md
Laravel web templates for VestaCP

I'm not using this or VestaCP anymore, so I can't confirm if still working or not.

I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html

@001101
001101 / whois.conf
Created October 22, 2019 10:09 — forked from thde/whois.conf
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc
@001101
001101 / bitwalletrecover.py
Created March 23, 2019 11:13 — forked from UdjinM6/bitwalletrecover.py
bitwalletrecover.py - recover compressed private keys from your bitcoin/litecoin/darkcoin wallet. Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), and base58 (https://pypi.python.org/pypi/base58).
## bitwalletrecover.py - recover private keys from your darkcoin wallet
## (this version was not tested with bitcoin/litecoin).
## Requires python3, pycoin (https://pypi.python.org/pypi/pycoin),
## and base58 (https://pypi.python.org/pypi/base58).
##
## Starting with Python 3.4, pip is included by default with the Python binary
## installers. To install pip for older versions 3.x:
##
## sudo apt-get install python3-setuptools
## sudo easy_install3 pip
@001101
001101 / metasploit-install-on-centos.sh
Created April 9, 2018 12:49 — forked from oogali/metasploit-install-on-centos.sh
Install Ruby 2.1.5 via rbenv, then Metasploit on CentOS
# install build deps
sudo yum install gcc gcc-c++ make expat-devel gettext-devel libcurl-devel \
libffi-devel libxml2-devel libxslt-devel libyaml-devel postgresql-server \
postgresql-devel readline-devel sqlite-devel openssl-devel ruby-devel \
rubygems autoconf automake bison libtool libpcap-devel
# install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
@001101
001101 / streamtester.php
Created October 3, 2017 01:34 — forked from jakob-stoeck/streamtester.php
stream tester
<?php
// You can use this file to test different video products in different players
// choose product and options
$product = 'hls'; // hls|stream_packaging|vod
$secure = true;
$staging = false;
$URLonly = false; // true to output only URL, false to output HTML
// no changes required below santa claus - happy holidays 2016
@001101
001101 / InstallingAgOnCentOS.md
Last active September 15, 2017 17:12 — forked from rkaneko/InstallingAgOnCentOS.md
Installing ag: the silver searcher on CentOS (fast file search tool)

Installing ag on CentOS

Prerequistes

  • libpcre
  • liblzma

Download, build and install

@001101
001101 / accounting.sql
Created February 18, 2017 09:08 — forked from NYKevin/accounting.sql
Basic double-entry bookkeeping system, for PostgreSQL.
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...