Skip to content

Instantly share code, notes, and snippets.

View rt1d6m7's full-sized avatar
👽
THE ALL is Mind; The Universe is Mental

Rijo Thomas rt1d6m7

👽
THE ALL is Mind; The Universe is Mental
View GitHub Profile
@rt1d6m7
rt1d6m7 / gist:f6843dd6ae574e05971ce3195a400c25
Created October 28, 2017 15:20 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>

Keybase proof

I hereby claim:

  • I am rt1d6m7 on github.
  • I am rt1d6m7 (https://keybase.io/rt1d6m7) on keybase.
  • I have a public key ASAdNo47_Jw-m3oIjAJPzP93xJJSPz4wk60xaEYfgGNztQo

To claim this, I am signing this object:

Bash History

history -d $((HISTCMD-1)) && history -d History_Number // delete history without any trace

history -d $((HISTCMD-1)) && Command // execute a command without leaving any trace

Get Info

for d in /dev/sd? ; do echo $d ; hdparm -I $d | egrep Number ; done // get hard disk drive partition and serial number

#!/bin/bash
# variables
LOGFILE="/var/log/nginx/access.log"
LOGFILE_GZ="/var/log/nginx/access.log.*"
RESPONSE_CODE="200"
# functions
filters(){
grep $RESPONSE_CODE \
import os
import time
def measure_temp():
temp = os.popen("vcgencmd measure_temp").readline()
return (temp.replace("temp=",""))
while True:
print(measure_temp())
time.sleep(1)
#!/usr/bin/python2.7
import os, time
from sys import *
repeat = False
data = ""
i = 1
if len(argv) > 1:
if argv[1] == 'repeat' or argv[1] == 'r' or argv[1] == '-repeat' or argv[1] == '-r':
@rt1d6m7
rt1d6m7 / raspberrypi-4-kali-linux.md
Last active January 21, 2024 06:09
Auto user login and vnc start on raspberry pi 4 kali linux 2020

Auto user login and vnc start on raspberry pi 4 kali linux 2020

Install raspi-config

wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20200601_all.deb

dpkg -i raspi-config_20200601_all.deb

apt-get -f install

@rt1d6m7
rt1d6m7 / raspberrypi-4-boot-from-usb-device.md
Last active June 22, 2020 03:48
Raspberry Pi 4 USB boot

Update USB Boot Firmware stable using Raspberry Pi OS

sudo apt update && sudo apt full-upgrade

sudo reboot

sudo nano /etc/default/rpi-eeprom-update and replace critical or beta to "stable"

sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin

@rt1d6m7
rt1d6m7 / postgres_queries_and_commands.sql
Created November 23, 2020 06:27 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
variables:
DOCKER_REGISTRY: 1234.dkr.ecr.ca-central-1.amazonaws.com
AWS_DEFAULT_REGION: ca-central-1
APP_NAME: abc
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
publish:
stage: build