Skip to content

Instantly share code, notes, and snippets.

@BarbUk
BarbUk / copyq
Last active December 14, 2023 19:52
Albert (https://github.com/albertlauncher/albert) external plugin to for copyq integration
#!/bin/bash
copyq_get_row(){
local copyq_row="$(copyq read $1 | head -1 | sed -e 's/^[[:space:]]*//')"
# clean from non compatible json char
printf -v clean_copyq_row "%q" "$copyq_row"
echo -n "$clean_copyq_row"
}
@awesomebytes
awesomebytes / debian_from_ros_pkg.md
Last active March 6, 2024 17:51
How to create a debian from a ROS package
@simonw
simonw / how-to.md
Last active March 26, 2024 23:21
How to create a tarball of a git repository using "git archive"
@olih
olih / jq-cheetsheet.md
Last active May 2, 2024 00:42
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@mattrude
mattrude / GnuPG-2.1.md
Last active September 10, 2023 12:05
GnuPG 2.1.18 Build Instructions for Ubuntu 16.04 LTS

GnuPG 2.1.20 Build Instructions

Below you is my build instructions for GnuPG 2.1.20 released on 03-Apr-2017. These instructions are built for a headless Ubuntu 16.04 LTS server.

Or if you wish, you may use the install script to install GnuPG 2.1.20 by entring the following:

curl -sL "https://gist.github.com/mattrude/3883a3801613b048d45b/raw/install-gnupg2.sh" |sh

Install the needed depends

apt-get -y install libgnutls-dev bzip2 make gettext texinfo gnutls-bin \

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@cviebrock
cviebrock / select2-foundation5.css
Created December 20, 2013 15:56
Select2 CSS for Zurb Foundation 5
/*
Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
*/
.select2-container {
margin: 0 0 1rem 0;
position: relative;
vertical-align: middle;
font-family: inherit;
-webkit-appearance: none !important;
font-size: 0.875rem;
@scottjacobsen
scottjacobsen / git+clone+ssh+agent+forward+sudo
Created December 14, 2012 00:07
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like:
@obscurerichard
obscurerichard / README.md
Created September 17, 2012 22:35
Simulates a low bandwidth, high-latency network connection

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default

slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.

@pzol
pzol / install_ruby192_freebsd.sh
Created December 18, 2010 23:24
How to install rvm 1.9.2 under FreeBSD - this is work in progress and not complete. You have to su or sudo -i to run this
# this does not run as a complete script :(
pkg_add -r bash curl sudo
pkg_add -r git vim # can you live without it?
pkg_add -r libxml2 libxslt # for nokogiri later
pw usermod pzol -G wheel
bash # start bash and run the rest inside it
curl -# -L http://bit.ly/rvm-install-system-wide > rvm-install-system-wide
bash -l < rvm-install-system-wide