Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
pythoninthegrass / kamal.md
Last active April 19, 2024 04:14 — forked from huksley/mrsk.md
kamal - the missing manual

kamal

This documentation adds important additions to the docs for kamal deploy tool (see github.com/basecamp/kamal)

Destination flag

You can use kamal deploy --destination staging

This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.

@a7madgamal
a7madgamal / Kaomoji.txt
Last active April 19, 2024 04:12
┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴
Joy
(^ω^)
(-‿‿-)
(o^▽^o)
(⌒▽⌒)☆
<( ̄︶ ̄)>
ヽ(・∀・)ノ
(´。• ω •。`)
( ̄ω ̄)
@gregorynicholas
gregorynicholas / .inputrc
Last active April 19, 2024 04:10
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
@marheiska
marheiska / Event Study
Created November 11, 2020 21:31
The performance of an Event Study (Python | AAR, CAR, t-test, betas, abnormal, stats)
import pandas_datareader as pdr
import pandas as pd
import numpy as np
from sklearn import linear_model
import scipy.stats as st
# Collect Data
data = pdr.DataReader(["TSLA","^GSPC"], 'yahoo','29-06-2010','01-01-2018')
data = data.drop(['High','Low','Open','Volume','Adj Close'], axis=1)
returns = data.pct_change(1) * 100
@wareya
wareya / spi_recorder.ino
Last active April 19, 2024 04:08
long SPI message recorder - rasberry pi pico (rp2040), arduino IDE .ino file (C++)
// wiring example for ripping a PMW3360 SROM: https://i.imgur.com/EspAlvz.jpeg
// set the board to 240mhz or higher for best results (WARNING: higher than 240mhz only works with USB if you overvolt the MCU)
// this implements reading SPI mode 3. if you want a different mode, you need to edit these two lines:
// uint32_t clockval = (1 << pin_clock);
// if (newclock && !clockval && buff_i < buffsize)
#include <pico/stdlib.h>
#define buffsize 50000
@sregg
sregg / e2e.yml
Created April 11, 2024 09:14
Maestro GitHub Actions Workflow
name: E2E tests
on:
workflow_dispatch:
# daily builds on week days at 6pm EDT (22:00 UTC or 23:00 UTC (day light savings adjustment))
schedule:
- cron: '00 23 * * 1,2,3,4,5'
env:
NO_FLIPPER: 1
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active April 19, 2024 04:06
Arel cheatsheet on Steroids

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias

@edolstra
edolstra / nix-lang.md
Last active April 19, 2024 04:04
Nix language changes

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to