Skip to content

Instantly share code, notes, and snippets.

View debuggerboy's full-sized avatar
:octocat:
I may be slow to respond

debuggerboy debuggerboy

:octocat:
I may be slow to respond
View GitHub Profile
@debuggerboy
debuggerboy / disable_mandb_install.md
Created June 26, 2021 16:56
Disable man-db installation

Remove the man-db package

sudo apt remove man-db --purge

Remove mandb directories

sudo rm -rf /usr/share/locale/
@debuggerboy
debuggerboy / hattori_hanzo.txt
Created August 9, 2020 22:28
Hattori Hanzo Productions
____________________________________________|________
\...........................................|>>>>>>>>|
H A T T O R I H A N Z O |````````
P R O D U C T I O N S
@debuggerboy
debuggerboy / gsort
Last active October 4, 2019 16:43
Sorting text content using Zenity
#!/bin/bash
############################################
# (C) GNU General Public License, version 2
############################################
UNSORT_FILE=$(mktemp /tmp/unsorted.XXXXXXXXX)
SORT_FILE=$(mktemp /tmp/sorted.XXXXXXXXX)
UNSORT_TEXT=$(zenity --text-info --title="Enter Unsorted Content" --width=500 --height=300 --editable)
cat <<EOF > ${UNSORT_FILE}
${UNSORT_TEXT}
EOF
@debuggerboy
debuggerboy / digitalocean-promo-cupon-code-free-trial.md
Created September 19, 2019 22:49
DigitalOcean Coupon Code $35 / $100 1 Year Free Trial - April 2018

alt text

Digital Ocean Promo Coupon Code $35 / $100 1 Year Free Trial

1) Get $35 / $25 / $20 / $10 free DigitalOcean Credit.

2) Get DigitalOcean 1 Year Free Trial.

3) Get $100 Credit For 60 Days. $100 Free Credits

@debuggerboy
debuggerboy / നഷ്ടകണക്ക്.txt
Created August 25, 2018 17:55
ഒരു ചെറിയ ബിറ്റ് കോയിൻ നഷ്ട കഥ
=====================
【●】ഐ.എൻ.ആർ
=====================
കയ്യിൽ ഉള്ളത് : 0.00256053 (ബി.ടി.സി)
ഇന്നത്തെ റേറ്റ് : 531000 (ഐ.എൻ.ആർ)
കൺവേർഷൻ റേറ്റ് : 1359.64 (ഐ.എൻ.ആർ)
=====================
【●】ടി.യു.എസ്.ഡി
=====================
കയ്യിൽ ഉള്ളത് : 0.00256053 (ബി.ടി.സി)
version: "3.2"
services:
nginx:
container_name: local-dev-web
image: nginx:latest
networks :
- local-devnet
ports:
- "80:80"
@debuggerboy
debuggerboy / digitalocean_coreos_docker_b4update.txt
Created July 30, 2017 06:54
Digitalocean CoreOS Docker Version 2016 before update
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.7.5
Git commit: a82d35e
Built: Tue Jul 18 23:18:48 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
@debuggerboy
debuggerboy / aws_autoscaling_cron.rb
Created April 1, 2017 09:46 — forked from kixorz/aws_autoscaling_cron.rb
Running cron jobs in AWS Auto Scaling group is tricky. When you deploy the same code and configuration to all instances in the group, cron job would run on all of them. You may not want that. This script detects the first instance in the group and allows only this instance to run the job. IAM user used by this script needs to have permissions to…
#!/usr/bin/env ruby
require 'syslog'
require 'net/http'
require 'aws-sdk'
Syslog.open
AWS.config({
:access_key_id => '<iam user key>',
:secret_access_key => '<iam user secret>'
@debuggerboy
debuggerboy / rsa-_host_fingerprint.txt
Created September 6, 2015 10:53
Get the SSH RSA HOST Fingerprint
for file in ~anish/.ssh/id_rsa.pub ; do ssh-keygen -lf $file; done
@debuggerboy
debuggerboy / static_dir_to_root_flask.txt
Created September 6, 2015 09:13
Serving Static Files From Root “/” and not “/static” Using Flask
There’s some discussion about how to do this here, involving Werkzeug’s middleware.
http://stackoverflow.com/questions/4239825/static-files-in-flask-robot-txt-sitemap-xml-mod-wsgi
This is another way to do it, assuming you have a folder called “static” under where the main application .py file is located:
from flask import Flask, request
app = Flask(__name__, static_url_path='')
@app.route('/')
def root():