Skip to content

Instantly share code, notes, and snippets.

View apisandipas's full-sized avatar

Bryan Paronto apisandipas

View GitHub Profile
@thalamus
thalamus / ArchLinuxARM-M1
Last active May 16, 2024 21:53
How to boot Arch Linux ARM in QEMU (patched for M1)
/*
* This document is provided to the public domain under the
* terms of the Creative Commons CC0 public domain license
*/
How to boot Arch Linux ARM in QEMU (patched for M1)
Prerequisites:
QEMU - patched for M1 processors - patches: https://github.com/utmapp/qemu
@peanutbutterandcrackers
peanutbutterandcrackers / Guix-DE-Integration.md
Last active August 12, 2023 15:20
Guix Desktop-Environment Integration Guide

Guix Desktop-Environment Integration:

A guide to better DE-Integration for the GNU Guix Package Manager.

This has been tried and tested (successfully) in the following desktop environments:

  • GNOME (Debian 10.2 'Buster')
  • MATE, XFCE, KDE (Linux Mint 19 'Tara')
  • Cinnammon (Linux Mint 19.1 'Tessa')
  • Pantheon (Elementary OS 5.0 'Juno')
@calebporzio
calebporzio / pure_html_css_modal.css
Last active February 28, 2022 18:15
The CSS for the pure HTML/CSS modal I tweeted about.
details summary {
cursor: pointer;
outline: none !important;
display: inline-block;
padding: 8px 12px;
padding-top: 10px;
border-radius: 4px;
overflow: hidden;
background: #F09825;
color: white;
# This is heavily based in the code here:
# https://gist.github.com/enpassant/0496e3db19e32e110edca03647c36541
# Special thank you to the user enpassant for starting it https://github.com/enpassant
#!/bin/bash
SYNTAX="$2"
EXTENSION="$3"
OUTPUTDIR="$4"
INPUT="$5"

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@jschroed91
jschroed91 / README.md
Last active January 9, 2020 15:55
Caxy Github Labels

This is a labels.json file to be used with the github-labels tool (node). The github-labels tool creates labels on a github repository by using a json file defining the label names and colors.

This is Caxy's default labels that faciliate the Caxy code review process.

Usage

Install github-labels globally if you don't have it

$ yarn global add github-labels
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@joshnuss
joshnuss / app.js
Last active March 4, 2024 00:01
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@rnevius
rnevius / wp-installer.sh
Created October 11, 2014 16:37
Shell / SSH WordPress Installer
#!/bin/bash -e
clear
echo ""
echo "============================================="
echo "# #"
echo "# Welcome to the WordPress Installer #"
echo "# #"
echo "============================================="
echo ""