Skip to content

Instantly share code, notes, and snippets.

🤘
Learning Elixir, Discovering Phoenix

Anders Ytterström madr

🤘
Learning Elixir, Discovering Phoenix
Block or report user

Report or block madr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rövardansen.js
function encrypt (str) {
return str.replace(/([^aeiouöäå01-9])/gi, (c) => { return `${c}o${c}`; });
}
function decrypt (str) {
return str.replace(/([^aeiouöäå01-9])o([^aeiouöäå01-9])/gi, (origin, first, last) => {
return (first == last)? first: origin;
});
}
View gist:cc0e19236c55701fc6e79e8cda75ddc8
## OS X
Installing Radicale on OS X is almost as easy as it is for Linux or *BSD.
OS X comes with Python preinstalled, but not version 3. Go to [python.org](https://www.python.org/downloads/mac-osx/) and download the latest version of Python. Run the installer.
It is also possible to install Python 3 using `brew` by typing `brew install python3` in a Terminal window.
Then launch a Terminal window, and type:
View hijax.js
(function (g) {
"use strict";
var hijax;
hijax = function (method, uri, data, onSuccess, onError) {
var client = new XMLHttpRequest();
if (onError == undefined) {
onError = function (status, response) {
alert('you have been found guilty of being in league with the devil ' +
View hijax.js
var hijax = function (method, uri, callback) {
var client = new XMLHttpRequest();
client.open(method, uri, true);
client.onload = function () {
if (client.status >= 200 && request.status < 400) {
callback(client.responseText);
}
};
View Jimmie special.md

Jimmie special 29:-: En burk Kung Gustavs sardiner, serveras med en påse chips (60g) och en lättöl

@madr
madr / javascript.js
Last active Jan 21, 2016
String replacement using regular expressions
View javascript.js
var results = 'hi bob123';
results = results.replace(/bob\d+/, 'cooper');
@madr
madr / autoexec.cfg
Last active Nov 15, 2015
chat wheels
View autoexec.cfg
bind G "+chatwheel; chat0"
alias chat0 "chat_wheel_phrase_0 50;chat_wheel_phrase_1 2;chat_wheel_phrase_2 7;chat_wheel_phrase_3 6;chat_wheel_phrase_4 44;chat_wheel_phrase_5 21;chat_wheel_phrase_6 78;chat_wheel_phrase_7 32;"
bind H "+chatwheel; chat1"
alias chat1 "chat_wheel_phrase_0 66;chat_wheel_phrase_1 69;chat_wheel_phrase_2 65;chat_wheel_phrase_3 70;chat_wheel_phrase_4 68;chat_wheel_phrase_5 62;chat_wheel_phrase_6 60;chat_wheel_phrase_7 85;"
@madr
madr / rutnät.scss
Created Nov 3, 2015
simple bootstrap for your own grid system
View rutnät.scss
@charset "utf-8";
// Grids, loosely based on Flexbox grid:
// https://github.com/kristoferjoseph/flexboxgrid
// extend to use flexbox
%row {
box-sizing: border-box;
display: -webkit-box;
display: -webkit-flex;
@madr
madr / sync.sh
Created Sep 2, 2015
Download whole site recursively over FTP using wget
View sync.sh
# set --cut-dir to the no parents that should be omitted (in this case 2: a and b)
wget -nv -r -nH --cut-dirs=2 ftp://<username>:<passwd>@<server>/a/b/
You can’t perform that action at this time.