Skip to content

Instantly share code, notes, and snippets.

View qodeninja's full-sized avatar
🐍
snek

Qodeninja qodeninja

🐍
snek
  • San Francisco
View GitHub Profile
# setfattr -n user.pax.flags -v "mr" $()
# find ~/.vscode-server -type f -iname "node" -o -iname "npm" -o -iname "npx"
@qodeninja
qodeninja / install-obsidian.sh
Created January 9, 2022 15:48
Install Obsidian App Script for Ubuntu
#!/usr/bin/env bash
# see https://forum.obsidian.md/t/gnome-desktop-installer/499
set -euo pipefail
icon_url="https://cdn.discordapp.com/icons/686053708261228577/1361e62fed2fee55c7885103c864e2a8.png"
#dl_url=${1:-}
dl_url=$( curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest \
| grep "browser_download_url.*AppImage" | tail -n 1 | cut -d '"' -f 4 )
@qodeninja
qodeninja / htaccess.log
Last active January 8, 2022 18:59
.htaccess template for when you're doing apache/wp/php stuff
# By @JAKKVEGA
# remove and change the stuff you don't need. These are only
# here for reference and not to be used OOB
# ----------------------------------------------------------------------
# General
# ----------------------------------------------------------------------
# disable the server signature
ServerSignature Off
@qodeninja
qodeninja / Bash_I_Forget.log
Last active January 5, 2022 22:55
Bash/Unix commands I always forget
# where C is the name or path, N is an integer
#check packages installed on ubuntu/debian
dpkg -l | grep NAME
#check mount meta
df -h PATH #or lsblk
#change mount options
id -u
#!/usr/bin/env bash
#===============================================================================
## __ ____
## / /_ ___ / / /___ _ __
## / __ \/ _ \/ / / __ \ | /| / /
## / / / / __/ / / /_/ / |/ |/ /
## /_/ /_/\___/_/_/\____/|__/|__/
##
#-------------------------------------------------------------------------------
#=====================================code!=====================================
@qodeninja
qodeninja / userChrome.css
Last active September 21, 2019 01:48
FF UserChrome.css Customizations
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tab-content{
padding 0 10px !important;
}
/* padding on all tabs */
#tabbrowser-tabs{
padding-top:5px
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Lockable script boilerplate
### HEADER ###
alice-blue F0F8FF 240 248 255 231
antique-white FAEBD7 250 235 215 230
aqua 00FFFF 0 255 255 051
aquamarine 7FFFD4 127 255 212 122
azure F0FFFF 240 255 255 231
beige F5F5DC 245 245 220 230
bisque FFE4C4 255 228 196 224
black 000000 0 0 0 016
blanched-almond FFEBCD 255 235 205 230
blue 0000FF 0 0 255 021
@qodeninja
qodeninja / color-term-256.db
Last active July 22, 2017 00:07
Xterm Color DB
black 000000 0 0 0 016
maroo 800000 128 0 0 088
green 008000 0 128 0 028
olive 808000 128 128 0 100
navy 000080 0 0 128 018
purple 800080 128 0 128 090
teal 008080 0 128 128 030
silver C0C0C0 192 192 192 145
grey 808080 128 128 128 102
red FF0000 255 0 0 196
@qodeninja
qodeninja / errno.h
Created July 22, 2017 00:05
Linux Error Codes
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */