Skip to content

Instantly share code, notes, and snippets.

@greglittlefield-wf
greglittlefield-wf / chat-osx-custom.css
Last active February 18, 2016 18:02
Custom HipChat CSS
/* Do font-size on the chat container so all font can respond to zoom. */
.chat_text {
/* These are %-based to enable text size scaling options. The default text size is defined
by a function on the WebPreferences object */
font-size: 100%;
}
p, div, .nameBlock p, .messageBlock p, .messageBlock div, .messageBlock pre {
font-size: inherit;
}
@fenneh
fenneh / gist:d818e38ad71d8a1e8d37
Created January 7, 2016 15:10 — forked from athieriot/gist:5532748
Hipchat with IRSSI

If you are adventurous, here the process to have Hipchat working in your favourite IRC client:

@ernix
ernix / mock_open.pl
Last active April 11, 2019 14:14
Mock(override) built-in `open` function in perl.
#
# http://perldoc.perl.org/CORE.html#OVERRIDING-CORE-FUNCTIONS
# > To override a built-in globally (that is, in all namespaces), you need to
# > import your function into the CORE::GLOBAL pseudo-namespace at compile
# > time:
# >
# > BEGIN {
# > *CORE::GLOBAL::hex = sub {
# > # ... your code here
# > };
@briandfoy
briandfoy / new_password
Last active May 22, 2020 12:34
(Perl) generate some random passwords
#!/Users/brian/bin/perl -CASD
use v5.30;
use open qw(:std :utf8);
use Math::Random::Secure qw(irand rand);
=encoding utf8
=head1 NAME
@Ovid
Ovid / Boilerplate.pm
Last active August 11, 2020 01:49
use less boilerplate
package Less::Boilerplate;
use 5.26.0;
use strict;
use warnings;
use feature ();
@romainl
romainl / _rnb.md
Last active August 12, 2021 21:56
RNB, a Vim colorscheme template
@slok
slok / create_github_bitbucket_mirror.md
Created December 8, 2011 11:30
Create github and bitbucket mirror in gitolite

Create Github/Bitbucket Mirror

Create SSH key and configure

Create Key (no passphrase and name mirror the key)

ssh-keygen -t rsa -N "" -f ~/.ssh/mirror
@heri16
heri16 / NetwatchGatewayStates.rsc
Last active December 19, 2021 11:13
Mikrotik RouterOS Script to do proper uplink failover/failback (more reliable than Netwatch)
# Mikrotik RouterOS Script to do proper uplink failover/failback (more reliable than Netwatch).
# Supports both Generic and PPPoE interfaces.
# Policy: read, write, policy, test
### Configuration ###
# Define Names of all Interfaces that will be checked:
:local "interface-names" { "internet-speedy";"internet-biznet" };
@ericdke
ericdke / notification.swift
Created October 10, 2014 21:01
Deliver an OSX notification with Swift
func showNotification() -> Void {
var notification = NSUserNotification()
notification.title = "Test from Swift"
notification.informativeText = "The body of this Swift notification"
notification.soundName = NSUserNotificationDefaultSoundName
NSUserNotificationCenter.defaultUserNotificationCenter().deliverNotification(notification)
}
//showNotification()
@winebarrel
winebarrel / pg_show_grants.sql
Last active July 12, 2022 00:28
show grants for PostgreSQL
select
pg_user.usename,
t1.nspname,
t1.relname,
relacl.privilege_type,
relacl.is_grantable
from (
select
pg_namespace.nspname,
pg_class.relname,