Skip to content

Instantly share code, notes, and snippets.

View Preen's full-sized avatar

Philip Mannheimer Preen

  • SkimSafe
  • Stockhollm, Sweden
View GitHub Profile
@Preen
Preen / Setup WP on ubuntu
Last active August 31, 2017 13:50
Setup wp on ubuntu
sudo su
curl -O https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
rm latest.tar.gz
cd wordpress
mv * ../
cd ..
rmdir wordpress
cd ..
defmodule Todo.Application do
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
defmodule Read do
def read do
case File.read("sample.txt") do
{ :ok, body } ->
String.split(body, "\n")
|> Stream.filter(&String.starts_with?(&1, "d"))
|> Enum.sort(&(byte_size(&1) >= byte_size(&2) ))
|> Stream.each(&IO.puts(String.capitalize(&1)))
|> Stream.run
{ :error, reason } ->
@Preen
Preen / deploy-wordpress-on-different-env-with-gulp-rsync.js
Last active September 27, 2016 15:59
Deploy Wordpress on different staging env. with Gulp Rsync and chmod it accordingly.
var argv = require('minimist')(process.argv);
var gulpif = require('gulp-if');
var prompt = require('gulp-prompt');
var rsync = require('gulp-rsync');
var chmod = require('gulp-chmod');
var sequence = require('run-sequence');
gulp.task('create_dist', function(){
// Add your paths here.
var paths = [
es:
buttons:
share: "Compartir en %{social_media}"
errors:
not_found_header: Oh no!
not_found_description: Nos parece que no puede encontrar la página que está buscando.
not_found_home_link: "Por favor, llévame a la página principa"
header:
ad: Ad
by: Por
@Preen
Preen / Turbolinks playing nice with Bugherd
Created December 10, 2015 10:31
A solution for Bugherd to play nice with Turbolinks. Otherwise you might get errors and the sidebar wont show up.