Skip to content

Instantly share code, notes, and snippets.

View ojura's full-sized avatar
:octocat:
⏯⏺⏮⏭

Juraj Oršulić ojura

:octocat:
⏯⏺⏮⏭
View GitHub Profile
diff -r ./perl5/lib/perl5/Git/FastExport/Stitch.pm Git-FastExport/lib/Git/FastExport/Stitch.pm
191,196c190,192
< my $github_name;
< $github_name = "googlecartographer/"; $github_name .= $repo->{name};
<
< $commit->{data} =
< "[$repo->{name}] " . $commit->{data} . "\nOriginal commit:\n" .
< $github_name. "@" .$repo->{mark_hashes}{$commit->{original_mark}}."\n";
---
> $commit->{data} =
#!/bin/bash
SOURCE_REPOS="cartographer cartographer_ros root:"
TARGET_REPO="cartographer_combined"
function update_repo() {
SOURCE=$(echo $1 | sed -E 's/:.*//')
cd $SOURCE
FIRST_RUN=$2
-- Copyright 2016 The Cartographer Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
#!/bin/bash
# scp-speed-test.sh
# Author: Alec Jacobson alecjacobsonATgmailDOTcom
#
# Test ssh connection speed by uploading and then downloading a 10000kB test
# file (optionally user-specified size)
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in kBs]
#
#!/usr/bin/python
import rospy
import rosbag
import os
import sys
import argparse
def remove_tf(inbag,outbag,frame_ids):
rospy.loginfo(' Processing input bagfile: %s', inbag)
rospy.loginfo(' Writing to output bagfile: %s', outbag)
@ojura
ojura / prepare_audio.sh
Created November 3, 2017 12:28
Abomination
#!/bin/bash
# Check if we are executing as root
if [ $UID != 0 ]; then
sudo ./prepare_audio.sh; exit
fi
# The nvidia driver cannot be loaded while we are configuring the GPU.
# Check whether the nvidia kernel is loaded:
#!/bin/bash
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
#!/usr/bin/env python
import roslib
import rospy
import math
import tf2_ros
import PyKDL
import geometry_msgs.msg
from math import pi
@ojura
ojura / gist:82c5b5da84cdcf6c9537685ea97daaa9
Created November 3, 2017 12:25
How to display a scrollable curses pad from python
#!/usr/bin/env python2
import curses
import time
mypad_contents = []
def main(scr):
# Create curses screen
scr.keypad(True)
[1.000000, 0.000000, 0.000000, 0.000000],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],