Skip to content

Instantly share code, notes, and snippets.

View clifton's full-sized avatar
🎯

Clifton King clifton

🎯
View GitHub Profile
@Lucas-Kohorst
Lucas-Kohorst / univ3Fees.py
Created August 1, 2021 20:28
Get fees, upper and lower price bounds for a uv3 position
## Thanks to https://twitter.com/JNP7771 for the script at https://playcode.io/780618/
## imports
import requests
import json
import pandas as pd
import math
from beautifultable import BeautifulTable
x96 = math.pow(2, 96)
@clifton
clifton / robbyrussell-hostname.zsh-theme
Last active May 5, 2022 17:53 — forked from SteelPangolin/robbyrussell-hostname.zsh-theme
Tweak robbyrussell ZSH theme to prepend hostname
if [[ -n $SSH_CONNECTION ]]; then
local hostname="%{$fg_bold[black]%}%m "
else
local hostname=""
fi
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${hostname}${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
@Arixsus
Arixsus / PlayerCharacter.cpp
Last active December 19, 2019 06:19
Falling Damage through Gameplay Ability System
#include "PlayerCharacter.h"
#include "Kismet/KismetMathLibrary"
#include "AbilitySystemBlueprintLibrary.h"
APlayerCharacter::APlayerCharacter()
{
// Change this to 1.0f to have it do 100% of remaining health damage.
FallDamage = .9f;
FallDamageMinimumVelocity = 1200.f;
FallDamageMaximumVelocity = 2000.f;
@cthurston
cthurston / ffmpeg_build.sh
Created August 2, 2019 16:45 — forked from billyshambrook/ffmpeg_build.sh
Build FFMPEG, x264 and FDK-AAC
sudo apt-get remove ffmpeg x264 libav-tools libvpx-dev libx264-dev yasm
sudo apt-get update
sudo apt-get -y install autoconf automake build-essential checkinstall git libass-dev \
libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libspeex-dev \
libtheora-dev libtool libvorbis-dev pkg-config texi2html zlib1g-dev
cd
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
@stefanproell
stefanproell / Dockerfile
Last active December 30, 2021 14:25
Run a Facebook Prophet Forecast in a Docker Container
# Run a python script using FB Prophet in a Docker container
# Build image: docker build -f Dockerfile-Debian -t forecast:R1 .
FROM python:3.4.6-wheezy
MAINTAINER Stefan Proell <stefan.proell@cropster.com>
RUN apt-get -y update && apt-get install -y \
python3-dev \
libpng-dev \
apt-utils \
@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@noprompt
noprompt / project.clj
Last active December 19, 2020 14:38
Demonstration using Garden to recreate the Semantic Grid framework.
(defproject semantic-gs "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "1.1.5"]
[garden "0.1.0-beta5"]
[hiccup "1.0.3"]]
:plugins [[lein-ring "0.8.5"]]
:ring {:handler semantic-gs.handler/app}
:profiles
{:dev {:dependencies [[ring-mock "0.1.5"]]}})
@DanielWright
DanielWright / 0_README.md
Last active December 17, 2015 21:59 — forked from svarks/0_README.md

ruby-1.9.3-p429 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active March 31, 2024 18:45 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@benzado
benzado / README
Created September 1, 2011 17:02
Convert a Google form response spreadsheet into a readable text file
I first tried to use sqlite's ability to import a file into a table, but ran
into a problem: if any line in the source file didn't have the same number of
columns as the table, the import would fail. For example, if your 10 question
survey ends with a comment field and a respondent left it blank, that line will
have 9 columns instead of 10 and the import will fail.
Next I tried to use a combination of command line tools like `cut` and `paste`,
but couldn't figure out anything that was reasonable. So I gave up and wrote a
perl script, which is fine, because this is what perl is good at.