Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
# Formats taken from the ones that Jetbrains IDEs use. | |
HTML_FORMATS = ( | |
"text/html;charset=UTF-16", | |
"text/html;charset=UTF-16BE", | |
"text/html;charset=UTF-16LE", | |
"text/html;charset=ISO-8859-1", | |
"text/html;charset=US-ASCII", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
#include <tuple> | |
#include <ros/ros.h> | |
#include <sensor_msgs/PointCloud2.h> | |
#include <sensor_msgs/point_cloud2_iterator.h> | |
template <bool RGB = false> class PCPublisher { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <string> | |
class TimeIt { | |
private: | |
std::string m_name; | |
std::chrono::time_point<std::chrono::high_resolution_clock> m_beg; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <string> | |
class TimeIt { | |
private: | |
std::string m_name; | |
std::chrono::time_point<std::chrono::high_resolution_clock> m_beg; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/sh | |
# For Whatsapp saved photos. | |
adb pull -a -z zstd /storage/emulated/0/Pictures/Whatsapp ./ | |
cd Whatsapp | |
exiftool '-FileCreateDate<${Filename; s/IMG-([0-9]{4})([0-9]{2})([0-9]{2})-.*\.jpg/$1:$2:$3 12:00:00+5:30/}' '-Exif:DateTimeOriginal<${Filename; s/IMG-([0-9]{4})([0-9]{2})([0-9]{2})-.*\.jpg/$1:$2:$3 12:00:00+5:30/}' *.jpg | |
cd .. | |
mv Whatsapp Cleansapp | |
adb push -z zstd ./Cleansapp /storage/emulated/0/Pictures/ | |
rm -r Cleansapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.cargo/bin" | |
# export PATH=/usr/local/cuda-11.7/bin${PATH:+:${PATH}} | |
# export LD_LIBRARY_PATH=/usr/local/cuda-11.7/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
# HISTFILE="$HOME/.zsh_history" | |
HISTSIZE=10000000 | |
SAVEHIST=10000000 | |
# setopt BANG_HIST # Treat the '!' character specially during expansion. | |
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. | |
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -r ~/.config/google-chrome/Default/{Service\ Worker,File\ System,IndexedDB} ~/.config/google-chrome/Profile\ 2/{Service\ Worker,File\ System,IndexedDB} ~/.config/google-chrome/Profile\ 3/{Service\ Worker,File\ System,IndexedDB} ~/.config/google-chrome/Profile\ 8/{Service\ Worker,File\ System,IndexedDB} ~/.config/google-chrome/Profile\ 11/{Service\ Worker,File\ System,IndexedDB} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage[outputdir=../out]{minted} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this as a context manager, | |
# with NoPrint(stdout=True, stderr=False): | |
# code_to_run() | |
class NoPrint: | |
def __init__(self, stdout=True, stderr=False): | |
self.stdout = stdout | |
self.stderr = stderr | |
def __enter__(self): |
NewerOlder