Skip to content

Instantly share code, notes, and snippets.

View r14c's full-sized avatar

Romina K S r14c

View GitHub Profile
import net, os, random
const lain_ascii_art = """
_..--¯¯¯¯--.._
,-'' `-.
,' `.
, \
/ \
/ ′. \
' / ││ ;
@gilbertw1
gilbertw1 / gruvbox.xresources
Created March 7, 2017 15:34
xmonad gruvbox dots
! -----------------------------------------------------------------------------
! File: gruvbox-dark.xresources
! Description: Retro groove colorscheme generalized
! Author: morhetz <morhetz@gmail.com>
! Source: https://github.com/morhetz/gruvbox-generalized
! Last Modified: 6 Sep 2014
! -----------------------------------------------------------------------------
! hard contrast: *background: #1d2021
!*background: #1d2021
@nepsilon
nepsilon / auto-backup-your-configuration-files-with-vim.md
Last active April 27, 2024 00:36
Auto-backup your configuration files with Vim — First published in fullweb.io issue #71

Auto-backup your configuration files with Vim

Not using versioning on your configuration files and editing them with Vim?

Use Vim’s backup option to automatically keep a copy of past versions. To put in your ~/.vimrc:

"Turn on backup option
set backup
@dckc
dckc / Makefile
Last active June 5, 2023 16:01
nix + sandstorm = <3
spk1.spk: sandstorm-pkgdef.capnp sandstorm-files.list
spk pack $@
# Destination (in-package) path must not start with '/': /nix/store/6f...
sandstorm-files.list: result
# nix-store --query --requisites result | sed -e 's,^/,,' >$@
find $$(nix-store --query --requisites `readlink result`) | sed -e 's,^/,,' >$@
result: default.nix
rm -rf result
@aaronlevin
aaronlevin / config.nix
Created April 21, 2016 10:49
Use Nix to build vim with +python support + custom python libraries
# I wanted to use ensime with vim, which requires vim + python + some python packages (websocket_client + sexpdata)
# unfortunately, nix would build vim with a python that didn't have access to my system libraries (for referential transperancy)
# so I needed to provide to `vim_configurable.nix` the right python to use *and* enable python, lua, etc. support.
# I also wanted to keep my `.vimrc` separate because some of the vim packages I use weren't available.
#
# install via: `nix-env -f '<nixpkgs>' -iA myCoolVim` or `nix-env -I nixpkgs=/path/to/your/nixpkgs -f '<nixpkgs>' -iA myCoolVim`
#
# out put of `vim --version` below.
{
@GGist
GGist / Cargo.toml
Created December 22, 2015 08:13
Command Line DHT Search Example (bip_dht)
[package]
name = "testing"
version = "0.1.0"
[dependencies]
bip_dht = "0.2.0"
@dannguyen
dannguyen / faa-333-pdf-gathering.md
Last active June 19, 2021 13:18
Using wget + grep to explore inconveniently organized federal data (FAA Section 333 Exemptions)

if !database: wget + grep

The Federal Aviation Administration is posting PDFs of the Section 333 exemptions that it grants, i.e. the exemptions for operators who want to fly drones commercially before the FAA finishes its rulemaking. A journalist wanted to look for exemptions granted to operators in a given U.S. state. But the FAA doesn't appear to have an easy-to-read data file to use and doesn't otherwise list exemptions by location of operator.

However, since their exemptions page is just one giant HTML table for listing the PDFs, we can just use wget to fetch all the PDFs, run pdftotext on each file, and then [grep](https://medium.com/@rualthanzauva/grep-was-a-private-command-of-m

@donpdonp
donpdonp / boom!
Created July 23, 2015 15:41
DigitalOcean + CoreOS with Terraform
$ ssh core@45.55.11.xxx
Warning: Permanently added '45.55.11.xxx' (ED25519) to the list of known hosts.
CoreOS stable (717.3.0)
core@rethink-cluster-sfo1 ~ $
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@vladignatyev
vladignatyev / progress.py
Last active March 31, 2024 22:54
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#