Skip to content

Instantly share code, notes, and snippets.

View xvzftube's full-sized avatar
💪
Yelling at a cloud

xvzf xvzftube

💪
Yelling at a cloud
View GitHub Profile
@xvzftube
xvzftube / q.sh
Created March 6, 2021 14:53
Using q to run sql-like commands in the command line.
#!/bin/bash
wget https://github.com/harelba/q/releases/download/2.0.19/q-text-as-data_2.0.19-2_amd64.deb
sudo dpkg -i q-text-as-data_2.0.19-2_amd64.deb
wget https://gist.githubusercontent.com/sarchak/b87ad2be315ce05f7a047550646f3c41/raw/0c7d83608111f74f212398fc0d2a704e4f8dc499/diamonds.csv
q -HOd , "select * from diamonds.csv limit 10"
@xvzftube
xvzftube / demo_csvtx.sh
Created July 3, 2021 21:16
csvtk video review
tar -xvzf ~/Downloads/csvtk_linux_amd64.tar.gz
ls
sudo cp csvtk /usr/local/bin/
csvtk
wget https://raw.githubusercontent.com/tidyverse/ggplot2/master/data-raw/diamonds.csv
cat diamonds.csv | head
csvtk pretty diamonds.csv | head
cat diamonds.csv | csvtk summary depth:sum --groups cut |
cat diamonds.csv | csvtk summary depth:sum --groups cut | csvtk pretty
cat diamonds.csv | csvtk summary --fields depth:sum --groups cut | csvtk pretty
@xvzftube
xvzftube / aws_ec2_deb.sh
Created July 29, 2021 13:39
This is an install script for setting up an ec2 (Debian 10)
#!/bin/sh
# License: GNU GPLv3
sudo apt-get update && apt-get upgrade -y
# install other common utils
sudo apt-get install build-essential wget curl neovim make tmux git python3-pip neofetch stow -y
# R section inspired by https://cran.r-project.org/bin/linux/debian/
# R - dependencies necessary to add a new repository over HTTPS (CRAN GPG depends on these)
sudo apt-get install dirmngr apt-transport-https ca-certificates software-properties-common gnupg2
@xvzftube
xvzftube / install.sh
Last active July 29, 2021 14:50
AWS EC2 Ubuntu 18.04
#!/bin/sh
# License: GNU GPLv3
sudo apt-get update && apt-get upgrade -y
# install other common utils
sudo apt-get install build-essential wget curl make tmux git python3-pip neofetch stow -y
# Download recent neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
@xvzftube
xvzftube / mount.sh
Created July 29, 2021 16:59
Mount a drive to EC2
sudo fdisk /dev/xvdb
sudo partprobe /dev/xvdb
sudo mkfs /dev/xvdb -t ext4 #n, enter, enter, ... w when prompted again. The w will write
sudo mount /dev/xvdb data/
sudo chown -R ubuntu data
library(ftplottools)
library(ggplot2)
library(ggtext)
theme_gruv <- function(){
title_text_color <- "#ebdbb2"
other_text_color <- "#ebdbb2"
grid_line_color <- "#ebdbb2"
panel_background <- "#32302f"
font_family <- "SauceCode Pro Nerd Font"
@xvzftube
xvzftube / scene.py
Created November 15, 2022 21:44
distributions
from manim import *
from scipy.stats import uniform, beta, norm, cauchy
import numpy as np
black_color = '#292c35'
black = "#292c35"
red = "#ee1d52"
yellow = "#f2d803"
blue = "#63a3be"
@xvzftube
xvzftube / ffmpeg.sh
Last active November 22, 2022 17:57
simple ffmpeg
ffmpeg \
-video_size $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-framerate 25 \
-f x11grab \
-i :1.0 \
output.mkv
# https://trac.ffmpeg.org/wiki/Capture/Desktop
@xvzftube
xvzftube / init.lua
Created March 26, 2023 00:12
new data science nvim config draft
-------------------------------------------------
-- xvzf neovim configuration
-- neovim website: https://neovim.io/
-- version:
-------------------------------------------------
-------------------------------------------------
-- general settings
-------------------------------------------------
@xvzftube
xvzftube / plugin.lua
Created March 26, 2023 01:58
plugins
return {
"folke/neodev.nvim", -- setting up nvim things
"folke/which-key.nvim", -- hints for keys
"sainnhe/everforest", -- everforest theme
"phaazon/hop.nvim", -- nvim motions
"nvim-lualine/lualine.nvim", -- lualine status bar
"kyazdani42/nvim-web-devicons", -- pretty icons
"lewis6991/gitsigns.nvim", -- git changes on side bar
"nvim-tree/nvim-tree.lua", -- file tree
"hkupty/iron.nvim", -- R and Python repl