Skip to content

Instantly share code, notes, and snippets.

@jchaffin
jchaffin / *Org Src notes.el
Created January 14, 2020 04:22
hide src delimiters in org mode
(with-eval-after-load 'org
(defvar-local rasmus/org-at-src-begin -1
"Variable that holds whether last position was a ")
(defvar rasmus/ob-header-symbol ?☰
"Symbol used for babel headers")
(defun rasmus/org-prettify-src--update ()
(let ((case-fold-search t)
@lbrame
lbrame / archtweaks.md
Last active June 1, 2025 21:05
Tweaks I've made to my Arch Linux installation

Arch Linux tweaks

This is a collection of the tweaks and modification I've made to my Arch Linux installation over the months. These may be applicable to other distros, but please check first before doing anything. I also included Arch Wiki references for all the procedures I mentioned. My recommendation is not to blindly follow this gist but to always check with the Arch Linux wiki first. Things move fast and by the time you're reading this my gist may be out of date. Lastly, the golden rule: never execute a command you don't understand.

Installing the KDE Plasma desktop

My current DE of choice is KDE's Plasma. I find it just about perfect.

There are various ways to install it on Arch. The most popular one is to install plasma and plasma-applications, but I don't like doing that because it comes with too many programs I'll never use. I, instead, install the base plasma group, remove the few extra packages that come with it, then I finish off by installing a few KDE apps that don't come with th

@hamidzr
hamidzr / sof-audio-setup-carbonx1.sh
Last active June 2, 2023 01:43
Lenovo Carbon X1 Gen 7 - Audio and microphone fix - https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_7) might be all you need.
#!/bin/bash
# README You probablyl don't need this script anymore. Please read the comments below to catch up.
## Description
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required.
# The script has only been tested for Arch and OpenSuse,
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823
# Prereq: Install Linux 5.3 or newer
@MrJmpl3
MrJmpl3 / mixins.scss
Created September 9, 2019 04:30
Vuetify - Elevation Color
@mixin ct-elevation-color($z, $color: #000, $important: false) {
$shadow-key-umbra-opacity: rgba($color, 0.2);
$shadow-key-penumbra-opacity: rgba($color, 0.14);
$shadow-key-ambient-opacity: rgba($color, 0.12);
$shadow-key-umbra: (
0: (
0px 0px 0px 0px $shadow-key-umbra-opacity
),
1: (
Ansible Introduction and Architecture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ansible is an automation engine that allows for agentless system configuration and deployment means it is simply a tool
that can execute tasks on remote or local system wherever you need to. It does this in a way that doesn't require any
real additional software outside of the ansible based binaries that you install on one server and runs Ansible modules
on remote system over SSH inorder to complete tasks.
Basic Components
----------------
Control Node : Any machine with Ansible installed. You can run commands and playbooks, invoking /usr/bin/ansible or
set -g default-terminal "tmux-256color"
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# prefix
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
@godismyjudge95
godismyjudge95 / mapbox-gl-draw.js
Created March 2, 2019 08:06
Mapbox GL Draw Click Propagation Fixed Build
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.MapboxDraw = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
var runSetup = require('./src/setup');
var setupOptions = require('./src/options');
var setupAPI = require('./src/api');
var Constants = r
@ngrilly
ngrilly / collision_probability.py
Last active December 18, 2020 12:50
Probability of collision with ULIDs on a 50 million years period
"""
ULID probability of collision
"""
import decimal
# A ULID uses 80 bits of entropy
d = decimal.Decimal(2**80)
# Generate 1,000 ULIDs per millisecond (1,000,000 per second)
@PatrickLang
PatrickLang / README.md
Last active March 4, 2023 05:49
Setting up a multi-arch Kubernetes cluster on ODroid HC-1 and Pine64 Rock64
@csereno
csereno / CloudWatchAgentConfig.json
Created October 1, 2018 20:35
AWS CloudWatch Agent configuration file example for Linux with standard /var/log/messages, secure, and yum logs
{
"agent": {
"metrics_collection_interval": 10,
"logfile": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log"
},
"metrics": {
"metrics_collected": {
"cpu": {
"resources": [
"*"