Skip to content

Instantly share code, notes, and snippets.

@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@juanbrujo
juanbrujo / comunas-regiones.json
Last active April 19, 2024 21:12 — forked from sergiohidalgo/comunas-regiones-chile.json
Comunas y regiones de chile JSON
{
"regiones": [
{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
},
{
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
},
@marcrasi
marcrasi / XXXX-constexpr.md
Last active April 19, 2024 21:10
Compile Time Constant Expressions for Swift
@chockenberry
chockenberry / ContentView.swift
Created April 17, 2024 17:43
NavigationPath Experiments
//
// ContentView.swift
// NavigationTest
//
// Created by Craig Hockenberry on 4/16/24.
//
import SwiftUI
struct OddView: View {
@rdenadai
rdenadai / python_expert_path.md
Last active April 19, 2024 21:07
My take into build a basic structure to dictate how to become a Python Expert ... from basic to specialist ?

Python Expert Path

Beginner

  • Basic syntax
    • Variables types:
      • bool, int, float, str, byte, complex, None
    • Conditionals:
      • if, else, elif, for, while, match
  • Functions: simple use, and known what first class citizen is (concept)
@mpneuried
mpneuried / Makefile
Last active April 19, 2024 21:06
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@hackruu
hackruu / di-fm-premium-account-generator.sh
Last active April 19, 2024 21:06
Generate di.fm premium account and playlist. Also supports radiotunes.com (ex sky.fm) and jazzradio.com.
#!/bin/bash
AGENT="AudioAddict-di/1.4.7 iOS/8.1"
COOKIES="./cookies.txt"
AUTH="ephemeron:dayeiph0ne@pp"
DOMAIN=gmail.com
PLAYLISTDI="di.fm.m3u"
PLAYLISTSKY="sky.fm.m3u"
PLAYLISTJAZZ="jazzradio.m3u"
PLAYLISTROCK="rockradio.m3u"
PLAYLISTCLASSICAL="classicalradio.m3u"
@sidward35
sidward35 / instructions.md
Last active April 19, 2024 21:04
Using a PS3 EyeToy with the Raspberry Pi

Having heard about the new camera driver built into the kernel of the new Raspbian OS image, I decided to have a play, using my PS3 EyeToy camera. The steps below are based on this forum thread, with some changes to reflect my own experience. The Raspberry Pi supports a number of cameras, not just the EyeToy, so if you have a spare one lying around, give it a go.

  1. Install the ‘motion’package:sudo apt-get install motion
  • This should automatically install the required ‘ffmpeg’ package – if not you can just do sudo apt-get install ffmpeg.
  1. Edit the config file:sudo nano /etc/motion/motion.conf
  • To enable daemon mode (so you can run the software in the background without it tying up your terminal):daemon on