Skip to content

Instantly share code, notes, and snippets.

View somebehemoth's full-sized avatar

Jeremy Bandini somebehemoth

View GitHub Profile
@curioswati
curioswati / flatpak-dmenu.md
Last active July 15, 2024 18:43
To run flatpak installed apps from dmenu.

To run a flatpak app from dmenu, you can create a symlink for the app in /usr/bin. You can find the flatpak apps binary link in /var/lib/flatpak/exports/bin/ on ubuntu. E.g. to run Rocket Chat (installed from flatpak via software center), you can do something like this:

sudo ln -s /var/lib/flatpak/exports/bin/chat.rocket.RocketChat /usr/bin/rocket-chat

This way you will be able to find it in the dmenu.

Resources:

local GITHUB_API_PATH = "https://api.github.com"
local GITHUB_API_USER = ""
local GITHUB_API_TOKEN = ""
local GITHUB_REPOS = {
"tdlm/os-x-self-destruct"
}
local rate_limit_percentage
local menu_bar_refresh_time = 60

Git Cheat Sheet

Commands

Getting Started

git init

or

@Kartones
Kartones / postgres-cheatsheet.md
Last active July 25, 2024 09:09
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@mxriverlynn
mxriverlynn / 1.js
Created March 29, 2012 03:32
template cache
TemplateCache = {
get: function(selector){
if (!this.templates){ this.templates = {}; }
var template = this.templates[selector];
if (!template){
var template = $(selector).html();
this.templates[selector] = template;
}