Skip to content

Instantly share code, notes, and snippets.

View ryanleonbutler's full-sized avatar
🐍
Python

Ryan Butler ryanleonbutler

🐍
Python
View GitHub Profile
# The definition of color schemes.
schemes:
gruvbox_material_hard_dark: &gruvbox_material_hard_dark
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
#!/usr/bin/env bash
sudo yum groups install -y Development\ tools
sudo yum install -y cmake
pip install neovim
(
cd "$(mktemp -d)"
git clone https://github.com/neovim/neovim.git
cd neovim
make CMAKE_BUILD_TYPE=Release
sudo make install
@ryanleonbutler
ryanleonbutler / fish_greeting.fish
Created April 29, 2022 10:18 — forked from dan-c-underwood/fish_greeting.fish
Custom fish greeting (for fish shell)
function fish_greeting
echo ' '(set_color F00)'___
___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)')
/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)'
[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime: '(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)'
\ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') IP Address: '(set_color white)(ipconfig getifaddr en0)(set_color red)'
\\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)'
\_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\
'(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J
@ryanleonbutler
ryanleonbutler / server.py
Created March 24, 2022 09:05 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
@ryanleonbutler
ryanleonbutler / README.md
Created March 21, 2022 12:12 — forked from donly/README.md
vibrancy theme for macOS VSCode
  1. Install plugin Custom CSS and JS Loader
  2. Open setting.json add lines below
     "vscode_custom_css.imports": ["file:///Users/Don/Documents/vscode/customtheme/vscode-vibrancy.css",
    "file:///Users/Don/Documents/vscode/customtheme/vscode-vibrancy.js"],
    "vscode_custom_css.policy": true,
    "terminal.integrated.rendererType": "dom"
    
  3. CMD + Shift + p, reload custom css and js
  4. Restart VSCode
@ryanleonbutler
ryanleonbutler / theme.yml
Created August 5, 2021 06:55 — forked from r-darwish/theme.yml
Alacritty One Dark Theme
colors:
# Default colors
primary:
background: '0x1e2127'
foreground: '0xabb2bf'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not present.
@ryanleonbutler
ryanleonbutler / .vimrc
Last active July 26, 2021 10:09
My .vimrc file
set nocompatible
filetype off
"Vundle plugin manager
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"all plugins here
Plugin 'gmarik/Vundle.vim'
Plugin 'tmhedberg/SimpylFold'
@ryanleonbutler
ryanleonbutler / admin.py
Created April 27, 2021 19:32
Django admin example
from django.db import models
from django.contrib import admin
from blog.models import Post, Category
class CategoryAdmin(admin.ModelAdmin):
pass
class PostAdmin(admin.ModelAdmin):
@ryanleonbutler
ryanleonbutler / models.py
Created April 27, 2021 19:30
Sample models example
from django.db import models
class Dog(models.Model):
dog_name = models.CharField(max_length=30)
dog_breed = models.CharField(max_length=30)
@ryanleonbutler
ryanleonbutler / models.py
Created April 27, 2021 19:29
Django models example
from django.db import models
from django.utils import timezone
STATUS = ((0, "Draft"), (1, "Publish"))
class Category(models.Model):
name = models.CharField(max_length=20)