Skip to content

Instantly share code, notes, and snippets.

info
@miguelmota
miguelmota / i3-cheat-sheet.md
Last active April 19, 2024 16:49 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (window/command or alt by default depending on config)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@storeman
storeman / php_unserialize_to_json.sql
Last active April 19, 2024 16:49
PHP unserialize in Postgresql to json
/**
Decode a php serialized value to json. This function only supports basic
data types:
- arrays (will always become a json object)
- booleans
- integers
- floats
- strings
- NULL
The php_unserialize(text) function is a helper function which extracts the first value
@gtallen1187
gtallen1187 / slope_vs_starting.md
Created November 2, 2015 00:02
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@kn0412
kn0412 / Arrow.java
Last active April 19, 2024 16:48
Arrow class for JavaFX
import javafx.scene.paint.Color;
import javafx.scene.shape.LineTo;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.Path;
/**
*
* @author kn
*/
public class Arrow extends Path{
@ulidtko
ulidtko / qnap-qts-fw-cryptor.py
Last active April 19, 2024 16:45
QNAP QTS firmware encryptor/decryptor.
#!/usr/bin/env python3
import os, sys
import argparse
import struct
from functools import reduce
"""
QNAP QTS firmware encryptor/decryptor.
Based on https://pastebin.com/KHbX85nG
<?php
/**
* PHP item based filtering
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
@pyotam
pyotam / System Prompts.md
Last active April 19, 2024 16:42
System Prompts for GPT-4 and multiple Popular GPTs (as of February 2024)

1) GPT-4 System Prompt:

You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-04 Current date: 2024-02-07

Image input capabilities: Enabled

Tools

@FreddieOliveira
FreddieOliveira / docker.md
Last active April 19, 2024 16:36
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android ๐Ÿ‹๐Ÿ“ฑ

Edit ๐ŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active April 19, 2024 16:34
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).