Skip to content

Instantly share code, notes, and snippets.

View goldbattle's full-sized avatar

Patrick Geneva goldbattle

View GitHub Profile
@ijason
ijason / dark-mode.css
Created April 10, 2020 18:59
Dark mode for Bootstrap 3. Combining dark mode switcher (https://github.com/coliff/dark-mode-switch) with Darkly theme (https://bootswatch.com/3/darkly/bootstrap.css). Work in progress.
[data-theme="dark"] {
background-color: #111 !important;
color: #eee;
}
[data-theme="dark"] .bg-light {
background-color: #333 !important;
}
[data-theme="dark"] .bg-white {
#!/usr/bin/env python
import sys
import roslib;
import rospy
import rosbag
from rospy import rostime
import argparse
import os
def parse_args():
#!/usr/bin/env python
from gimpfu import *
def solid_bezel(image, drawable, pixels, interior):
# If an interior face, light comes from bottom left
outer, inner = 16, 17
if interior:
outer, inner = 17, 16
@gocarlos
gocarlos / Eigen Cheat sheet
Last active February 11, 2024 14:07
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
# Below are instructions for building Caffe, assuming CUDA 8.0 & CUDNN are alrady installed.
# get dependencies
sudo apt install liblmdb-dev libhdf5-dev libgoogle-glog-dev libgflags-dev libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler python-numpy python-yaml
sudo apt install --no-install-recommends libboost-all-dev
# get Caffe latest
git clone https://github.com/BVLC/caffe.git
cd caffe
@joemerlino
joemerlino / Pokèmon.h
Created July 6, 2016 21:36
Pokèmon GO class-dump
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#pragma mark Function Pointers and Blocks
typedef void (*CDUnknownFunctionPointerType)(void); // return type and parameters are unknown
@Dalet
Dalet / twitchhtml5.user.js
Last active September 10, 2021 22:12
Twitch HTML5 player userscript
// ==UserScript==
// @name Twitch HTML5 player
// @namespace Revolution
// @include http://*.twitch.tv/*
// @exclude http://api.twitch.tv/*
// @exclude http://tmi.twitch.tv/*
// @exclude http://chatdepot.twitch.tv/*
// @require https://gist.githubusercontent.com/BrockA/2625891/raw/9c97aa67ff9c5d56be34a55ad6c18a314e5eb548/waitForKeyElements.js
// @version 1
// @grant none
#!/usr/bin/env zsh
# ./day.sh month_number morning_day evening_day zoom_level
# Strictly alpha: for example, does not know how to handle
# month edges or unscheduled missing images.
set -eu
year=$1
@celoyd
celoyd / hi8-anim-howto.md
Last active August 1, 2022 15:37
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@jbergler
jbergler / .gitignore
Last active April 9, 2024 19:49
Acestream on Mac
.vagrant