Skip to content

Instantly share code, notes, and snippets.

@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
@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;
@fffaraz
fffaraz / qt-unix-signals.md
Created May 22, 2017 21:36 — forked from azadkuh/qt-unix-signals.md
Catch Unix signals in Qt applications

Unix signals in Qt applications

It's quite easy to catch unix signals in Qt applications. you may like to ignore or accept them.

#include <QCoreApplication>

#include <signal.h>
#include <unistd.h>
@Alabate
Alabate / rosbridge_watcher.py
Created May 1, 2019 19:01
rosbridge watcher
#!/usr/bin/env python3
import rospy
import urllib.request
import urllib.error
import socket
import os
# This is not a param to avoid param injection
# or unexpected programm killed because of a simple rosparam set with a wrong value

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@jeffcogswell
jeffcogswell / org_ally1_bus_fix.md
Last active April 23, 2023 01:10
Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus ...

Seeing this error in the bash shell when launching some apps, such as scite:

** (scite:5298): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

Update as per comments below.

It appears adding this library fixes the problem: at-spi2-core

(require 'dash)
(require 's)
(require 'loop)
(require 'icons-in-terminal)
(defun my-char-at-point (&optional p)
"P."
(let ((point (or p (point))))
(if (< point (point-max)) (buffer-substring-no-properties point (1+ point))
"")))
@huytd
huytd / customize.material-dark-theme.md
Last active September 2, 2023 13:03
My minimal Emacs config

;; Automatically generated
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(anzu-cons-mode-line-p nil)
@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 \

@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.