Skip to content

Instantly share code, notes, and snippets.

@meereeum
meereeum / arxivate.sh
Last active December 4, 2019 23:39
bash util for making your tex arXivable
#!/usr/bin/env bash
# this script gets your latex ready for arxiv submission by
# (1) sanitizing your *.tex of embarrassing comments,
# (2) arxiv-proofing filenames, &
# (3) gzipping everything needed into a convenient .tar.gz
HELPFLAG="-h"
FIGFLAG="-d"
OUTFLAG="-o"
import sys
import numpy as np
import operator
# def discriminant(a,b,c):
# return (b**2) - 4*a*c
# def quadratic(a,b,c):
# """Compute roots from a polynomial of the form ax^2 + bx + c."""
# ops = [operator.add, operator.sub]
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active September 19, 2024 08:26
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@atotto
atotto / ros_odometry_publisher_example.py
Last active October 3, 2024 05:44
Publishing Odometry Information over ROS (python)
#!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
@noelboss
noelboss / git-deployment.md
Last active October 12, 2024 16:09
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 15, 2024 09:51
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@abarringer
abarringer / gist:846621
Created February 27, 2011 22:24
Convert XML to SQLite
require 'rubygems'
require 'sqlite3'
require 'rexml/document'
include REXML
xml =<<XML
<records>
<entry><name>abc</name><qty>3</qty></entry>
<entry><name>def</name><qty>5</qty></entry>
<entry><name>ghi</name><qty>2</qty></entry>