Skip to content

Instantly share code, notes, and snippets.

View TheRinger's full-sized avatar
🖕
1EWEZACF6bsXC5zy7KTxGYs1aMunKF4WaZ

TheRinger TheRinger

🖕
1EWEZACF6bsXC5zy7KTxGYs1aMunKF4WaZ
View GitHub Profile
@willurd
willurd / web-servers.md
Last active July 28, 2024 14:39
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@AD7six
AD7six / default
Created August 13, 2014 10:30
/etc/default/virtualbox - If you're bored shitless of virtualbox preventing your computer from shutting down cleanly; and concequently needing to check your disks on every boot - this is the file for you to edit
# Defaults for virtualbox initscript
# sourced by /etc/init.d/virtualbox
# installed at /etc/default/virtualbox by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Set this to 1 if you would like the virtualbox modules to be loaded by
# the init script.
@yunga
yunga / Cliref.md
Last active July 1, 2024 16:19
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     yunga.palatino@gmail.com
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

/*****************************************
* Read QSee/Zmodo cameras *
* Forward stream to FIFO pipe *
* Author: Daniel Osborne *
* Based on IP Cam Viewer by Robert Chou *
* License: Public Domain *
*****************************************/
/* Version history
* 0.41 - 2013-05-03
@Tafkas
Tafkas / fitbit_stride_regression.R
Created December 19, 2014 22:59
Fitbit Stride Length Linear Regression
runs <- read.csv("myrunninglog.csv", header=T, sep=",")
#convert date
runs$Date <- strptime(as.character(runs$Date), format="%Y-%m-%d")
#convert distance from km to meters
runs$Distance <- 1000 * runs$Distance
ggplotRegression <- function (fit) {
@yunga
yunga / ggimgs.pl
Last active March 11, 2019 22:25
Get Google Images search results.
#!/usr/bin/perl
use Mojolicious::Lite;
use Mojo::Util qw(url_escape url_unescape);
use File::Path qw(make_path);
use Getopt::Std;
##### Available colors and sizes on google image search ###
my %color = (
full => "ic:color", bw => "ic:gray", any => "",
@chaseroden
chaseroden / pioner_video_conversion.md
Last active May 31, 2022 21:01
How to use `mencoder` to convert MP4 videos for a Pioneer AVH-280BT head unit

How to use mencoder to convert MP4 videos for a Pioneer AVH-280BT head unit

These directions are geared toward OS X but I'm assuming this will work on Linux systems and possibly Windows machines with mplayer/mencoder installed. These directions assume basic familiarity with the terminal/command line. If you are not comfortable with that or would rather use a GUI, there are other options like this helpful page which shows how to use the DivX video converter to do this same thing.

I also assume these instructions will work on other Pioneer head units I don't happen to own, and possibly on other brands as well.

Install ffmpeg and mplayer using Homebrew

  1. If you don't have Homebrew, the OS X command-line package manager, you will need to install it using instructions found on their website. Homebrew allows you to specify that you want to build an installation from source, which you will need
@linar-jether
linar-jether / simple_python_datasource.py
Last active May 24, 2023 01:22
Grafana python datasource - using pandas for timeseries and table data. inspired by and compatible with the simple json datasource ---- Up-to-date version maintained @ https://github.com/panodata/grafana-pandas-datasource
from flask import Flask, request, jsonify, json, abort
from flask_cors import CORS, cross_origin
import pandas as pd
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
@imtaehyun
imtaehyun / technical-analysis-indicators-without-talib-code.py
Last active July 18, 2024 00:09
Technical analysis Indicators without Talib (code)
# https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code
import numpy
import pandas as pd
import math as m
#Moving Average
def MA(df, n):
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n))
df = df.join(MA)