Skip to content

Instantly share code, notes, and snippets.

View Rizwan-Hasan's full-sized avatar
🌏
Working remotely

Rizwan Hasan Rizwan-Hasan

🌏
Working remotely
View GitHub Profile
@Rizwan-Hasan
Rizwan-Hasan / redis-redisinsight.yml
Created January 25, 2025 06:09
A docker compose file for spinning up redis with redisinsight
name: redis-redisinsight
services:
redis:
image: redis
ports:
- target: 6379
published: "6379"
protocol: tcp
restart: unless-stopped
@Rizwan-Hasan
Rizwan-Hasan / postgres-pgadmin4.yml
Last active January 25, 2025 06:26
A docker compose file for spinning up postgresql with pgadmin4
name: postgresql-pgadmin4
services:
postgresql:
container_name: postgresql
environment:
- PUID=1000
- PGID=1000
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
@Rizwan-Hasan
Rizwan-Hasan / nord.Xresources
Last active January 24, 2025 19:44
An arctic, north-bluish clean and elegant Xresources color theme.
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! title Nord XResources +
! project nord-xresources +
! version 0.1.0 +
! repository https://github.com/arcticicestudio/nord-xresources +
! author Arctic Ice Studio +
! email [email protected] +
! copyright Copyright (C) 2016 +
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@Rizwan-Hasan
Rizwan-Hasan / create-package.md
Created August 17, 2021 20:19 — forked from deanrather/create-package.md
Creating a .deb Package

Creating a .deb Package

This creates a package which runs an install.sh which copies a file somewhere the below is entirely incorrect. Hopefully I'll get around to fixing it tip: this would install to the root dir & the relative path to ./install.sh would be wrong

go to project directory

cd /path/to/project
@Rizwan-Hasan
Rizwan-Hasan / Javascript CustomEvent Example.js
Created August 1, 2021 12:11
A simple example of JavaScript CustomEvent
const event_target = new EventTarget();
event_target.addEventListener('asuna_yuuki', event => console.log(event.detail));
event_target.addEventListener('rize_kamishiro', event => console.log(event.detail));
event_target.dispatchEvent(
new CustomEvent('asuna_yuuki', {
detail: {
data: 'Asuna Yuuki',
},
@Rizwan-Hasan
Rizwan-Hasan / dev.conf
Created March 7, 2021 16:42 — forked from fnando/dev.conf
Nginx configuration for SSH tunnel
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.codeplane.com br.dev.codeplane.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
# Put this file in /etc/nginx/sites-available
# Then "ln -s /etc/nginx/sites-available/aria2-nginx.conf /etc/nginx/sites-enabled"
# Then "sudo service nginx restart"
server {
listen 80;
listen [::]:80;
root /var/www/aria2; # Put your aria2 web ui here, such as AriaNg
index index.html;
server_name DOMAIN_NAME;
location / {
@Rizwan-Hasan
Rizwan-Hasan / Base64.js
Created February 14, 2021 12:42 — forked from alkaruno/Base64.js
Base64 encode & decode (only for numbers) in JavaScript
var Base64 = (function () {
var ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var Base64 = function () {};
var _encode = function (value) {
if (typeof(value) !== 'number') {
throw 'Value is not number!';
@Rizwan-Hasan
Rizwan-Hasan / git-io-custom-url.md
Created December 21, 2020 16:22 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
# ~/.config/systemd/user/jupyter.service
[Unit]
Description=An interactive python notebook server
After=network.target

[Service]
ExecStart=/usr/bin/jupyter notebook\
    --no-browser\
 --port=8001\