Skip to content

Instantly share code, notes, and snippets.

View csuarez's full-sized avatar

César Suárez Ortega csuarez

View GitHub Profile
@csuarez
csuarez / launchaco-gdpr.html
Last active May 20, 2018 11:52
Simple HTML message to be GDPR compliant in your Launchaco pages
<script async="" src="https://www.google-analytics.com/analytics.js"></script>
<script>
if (typeof gaSent === 'undefined') {
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
@csuarez
csuarez / focus-pomodoro.sh
Last active September 14, 2020 11:21
Non-stop Pomodoro implementation for Focus (https://heyfocus.com/)
#!/bin/sh
open focus://unfocus
pomodoros=0
while true
do
pomodoros=$((pomodoros + 1))
pomodoroMsg="Pomodoro #"
pomodoroSubtitle=$pomodoroMsg$pomodoros
@csuarez
csuarez / uninstall_shell_integration.sh
Created October 15, 2016 11:13 — forked from victor-torres/uninstall_shell_integration.sh
Uninstalling shell integration from iTerm 2
#!/bin/bash
function die() {
echo "${1}"
exit 1
}
which printf > /dev/null 2>&1 || die "Shell integration requires the printf binary to be in your path."
which sed > /dev/null 2>&1 || die "Shell integration requires the sed binary to be in your path."
@csuarez
csuarez / Vagrantfile
Last active September 23, 2016 09:27
Simple Vagrantfile for Symfony 2.8 + MySQL projects (Ubuntu 14.04 + PHP 5.6 + Apache 2 + Git + Composer + MySql + PHPMyAdmin)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.synced_folder ".", "/vagrant_data"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
@csuarez
csuarez / Vagrantfile
Last active June 4, 2016 14:21
Simple Vagrantfile for Symfony 2.8 projects (Ubuntu 14.04 + PHP 5.6 + Git + Composer)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.synced_folder ".", "/vagrant_data"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
@csuarez
csuarez / slides.py
Last active February 12, 2016 11:24
Código de las slides para las II Jornadas Técnicas UEx – CIEMAT. Introducción a NoSQL con MongoDB
"""
Ejemplo diccionario
"""
product = {
"type": "videogame",
"title": "The Witness",
"price": 36.99,
"description": "Best game ever",
"platforms": ["PC", "PS4"],