Skip to content

Instantly share code, notes, and snippets.

View shaggybb's full-sized avatar

Ivan Rubio shaggybb

  • Xing
  • Barcelona, Spain
View GitHub Profile
@Swop
Swop / UrlEncodeType.php
Created August 2, 2014 11:33
UrlEncodeType (credits: Benjamin Marquant)
<?php
/**
* @author Benjamin Marquant
* @website http://www.bxnxg.com
* @example http://website.com/My Fân Page !/ > http://website.com/my-fan-page/ and become a simple url rewriting
*/
class UrlEncodeType {
private $url;
@ericelliott
ericelliott / unhandled-exceptions.js
Created September 4, 2016 23:32
Capturing Unhandled Exceptions
window.onerror = function(message, file, line, column, error) {
error = error || {};
$.ajax({
method: 'POST',
url: 'https://yourapp.com/path/to/error/log',
data: JSON.stringify({
message: message,
file: file,
line: line,
column: column,
<VirtualHost *:80>
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=308,L]
</VirtualHost>
@mjackson
mjackson / travis.yml
Last active May 25, 2022 13:56
Travis CI + google-cloud-sdk + updated kubectl + Docker
# The Google Cloud SDK on Travis is pretty old (2014). So if
# you want to use an up-to-date version, you have to install
# your own. This config is the bare minimum you'll need to
# get an updated version of the SDK + kubectl.
cache:
directories:
# We cache the SDK so we don't have to download it again on subsequent builds.
- $HOME/google-cloud-sdk
services:
# Include the docker service so you can roll your own images.