Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcus Ramberg marcusramberg

View GitHub Profile
View mojo-file.md

Manipulating the file system with Mojo::File

The Mojo framework has long had various utility functions for file manipulation, but recently in version 7.15 they were collected in a new class, Mojo::File. This class gives a very convenient and easy API for cross-platform file manipulation. It's also used across the entire Mojo framework, from Mojo::Home (now a Mojo::File subclass) to Mojo::Asset::File and +Mojo::UserAgent::Transactor.

In addition to the object constructor, Mojo::File exports some neat

View .svimrc
let blacklists = ["*://mail.google.com/*", "*://inbox.google.com/*", "*://feedly.com/*"]
map "?" help
" tabs navigation
unmap "h"
unmap "l"
map "l" nextTab
map "h" previousTab
map "q" firstTab
map "w" previousTab
View mosh_pc.sh
#!/bin/sh
# ########################################################## #
# wrapper for mosh to work with ssh's proxycommand directive #
# this only makes sense if the machine is directly reachable #
# from the internet using udp. #
# ########################################################## #
THISSCRIPT="`basename \"$0\"`"
REMOTE="$1"
@marcusramberg
marcusramberg / .cvimrc
Last active Feb 17, 2019 — forked from calorie/.cvimrc
My cvimrc
View .cvimrc
set autoupdategist
set noautofocus
set nocncpcompletion
set smoothscroll
set hud
set noregex
set noinsertmappings
set typelinkhints
set defaultnewtabpage
let scrollduration = 10
View gist:9039077
Call for papers / Call for speakers - Mojoconf 2014
TLDR;
* CfP Mojoconf 2012
* Date: 2014-03-24
* Deadline: 2014-03-15
* Submit 20min/40min talks: http://www.mojoconf.org/mojo2014/newtalk
As previously announced the first Mojolicious related conference ever, Mojoconf 2014, will be hosted by Oslo.pm in Oslo, Norway during the weekend of May 23rd to 25th.
View bootstrap_homeshick.sh
#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/gists/2913223/download | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the download button.
pushd $HOME
aptget='sudo apt-get'
chsh='sudo chsh'
View cocoabots-uncrustify.cfg
# Uncrustify 0.59
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
View gist:27814
#! perl -w
use strict;
my $content = '=toc<br />
=toc 2-4<br />
<p>=toc 2</p>
<div id="stff">=toc -3<br />
<p>=toc 2-</p>
';