Skip to content

Instantly share code, notes, and snippets.

View robrwo's full-sized avatar
💭
Fnorjd

Robert Rothenberg robrwo

💭
Fnorjd
View GitHub Profile
@tomredsky
tomredsky / Artist.pm
Created September 29, 2021 13:22
DBIx example
package MyApp::Schema::Result::Artist;
use warnings;
use strict;
use base qw( DBIx::Class::Core );
__PACKAGE__->table('artist');
__PACKAGE__->add_columns(
#!/bin/bash
PSQL="/usr/bin/psql"
PGUSER="dpaikkos"
DBNAME="import"
DUMP="sirius-latest.pg"
REMOTE="proxima"
rm -f $DUMP
/usr/bin/rsync -La --progress sirius:/data/pg_dumps/latest.pg ${DUMP}
set client_encoding='LATIN1';
BEGIN;
DELETE FROM FIELDS WHERE NAME = 'CM.AG2';
ALTER TABLE CM DROP COLUMN AG2;
COMMIT;
BEGIN;
DELETE FROM FIELDS WHERE NAME = 'CM.RG4';
ALTER TABLE CM DROP COLUMN RG4;
COMMIT;
BEGIN;
#!/bin/bash
PSQL="/usr/bin/psql"
PGUSER="dpaikkos"
DBNAME="for_import"
DUMP="www-latest.pg"
REMOTE="proxima"
echo "Fetch $DUMP from $REMOTE"
rm -f $DUMP
@robrwo
robrwo / .gitconfig
Last active March 1, 2024 09:20
Git configuration with useful aliases
[alias]
co = checkout
di = diff
st = status
sh = show
ci = commit
br = branch
cp = cherry-pick
last = show -1 HEAD
unstage = reset HEAD --
@baskaufs
baskaufs / dctype.ttl
Created February 26, 2016 17:57
Dublin Core type vocabulary in Turtle
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix xml: <http://www.w3.org/XML/1998/namespace>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix dcam: <http://purl.org/dc/dcam/>.
@prefix dcterms: <http://purl.org/dc/terms/>.
<http://purl.org/dc/dcmitype/> dcterms:modified "2010-10-11";
dcterms:publisher <http://purl.org/dc/aboutdcmi#DCMI>;
@spyesx
spyesx / adblock-blacklist.css
Last active February 7, 2024 09:48
Class and ID to avoid because of AdBlock
.sidebar_newsletter_sign_up,
.sidebar_subscribe,
.sign-up-form-single,
.signup-form--header,
.signup-with-checkboxes,
.skinny-sign-up,
.slidedown-newsletter,
.small-newsletter,
.social-link-mail,
.social_newsletter_box,
@topheman
topheman / git-notes.md
Created June 29, 2015 17:39
Git notes cheat sheet
@peczenyj
peczenyj / monads.pl
Last active August 29, 2015 13:57
Monads in Perl, with operator >>= , is it possible?
package Maybe;
use Moo::Role;
has value => (is => 'ro', required => 1);
use overload
'>>='=> \&bind;
sub bind {
@robrwo
robrwo / sync-dotfiles.sh
Last active January 2, 2016 12:19
This is a quick-and-dirty utility to synchronise dotfiles and utilities to other machines
#!/bin/bash
hostname=$1
command=`basename $0`
if [ -z "${hostname}" ]; then
echo Usage: ${command} hostname
exit 1
fi