Skip to content

Instantly share code, notes, and snippets.

View ermand's full-sized avatar

Ermand Durro ermand

View GitHub Profile
@ermand
ermand / settings.json
Created May 4, 2023 20:15
VSCode Vim config
{
"vim.easymotion": false,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.insertModeKeyBindings": [
{
"before": [
"j",
@ermand
ermand / highlight_links.js
Created April 8, 2018 16:15
Highlight links
@ermand
ermand / docker-destroy-all.sh
Created July 19, 2017 19:06 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@ermand
ermand / phpcs.sh
Created April 4, 2017 06:36
Laravel 5.3 PHP CS Fixer example.
#!/bin/sh
## chmod +x phpcs.sh
## ./phpcs.sh
php-cs-fixer --verbose fix --config-file=.php_cs
@ermand
ermand / is_palindrome.php
Created December 27, 2016 17:29
Check if a string is palindrome
<?php
// <!-- $string = "A man, a plan, a canal, Panama"; -->
function is_palindrome($string)
{
$a = strtolower(preg_replace("/[^A-Za-z0-9]/", "", $string));
return $a == strrev($a);
}
@ermand
ermand / opcache_reset.php
Created October 5, 2016 13:58
Reset opcache in php
<?php
opcache_reset();
?>
@ermand
ermand / iterm2-solarized.md
Last active September 29, 2017 19:17 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@ermand
ermand / buergerbot.rb
Created June 7, 2016 15:47 — forked from tokhi/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
# make sure you the watir gem installed -> gem install watir
require 'watir'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification Burgerbot with title "%s"\'' % message
rescue StandardError => e
@ermand
ermand / sublime-text-key-mappings.json
Last active November 25, 2016 11:11
Sublime Text Key Mappings
[
{
"keys": [".", "p"],
"command": "run_phpunit_test"
},
{
"keys": [".", "m"],
"command": "run_single_phpunit_test"
},
{
@ermand
ermand / singleton-ruby.sublime-snippet
Created November 10, 2015 08:24
Singleton Class for Ruby
<snippet>
<content><![CDATA[
class << ${1:self}
$0
end
]]></content>
<tabTrigger>meta</tabTrigger>
<scope>source.ruby</scope>
</snippet>