Skip to content

Instantly share code, notes, and snippets.

@EspadaV8
EspadaV8 / gist:1357237
Created November 11, 2011 05:04
Script to import Geonames into PostgreSQL taken from http://forum.geonames.org/gforum/posts/list/15/926.page
#!/bin/bash
#===============================================================================
#
# FILE: getgeo.sh
#
# USAGE: ./getgeo.sh
#
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your
# database
#
@EspadaV8
EspadaV8 / overrides.css
Last active May 19, 2020 06:58
Dark Laravel Docs theme
body {
color: #ccc;
background: #525252 url("/assets/img/cloud-bar.png") repeat-x;
}
.docs article code[class*="language-"],
.docs article pre[class*="language-"] {
font-size: 14px;
}
<?php
/**
* Assert that a given where condition does not matches a soft deleted record
*
* @param string $table
* @param array $data
* @param string $connection
* @return $this
*/
protected function seeIsNotSoftDeletedInDatabase($table, array $data, $connection = null)
@EspadaV8
EspadaV8 / mc-ssh.bash
Created July 18, 2011 05:12
Simple script to use minecraft over an SSH tunnel
#!/bin/bash
MCLAUNCHER="path/to/MinecraftLauncher.jar"
# Your SSH host, e.g. www.example.com
SSHHOST="<your-ssh-host>"
# Stores the controlmaster file. Need to enable controlpath in the ssh .config file
SOCKCTL="~/.mc-ssh-ctl"
<?php
Route::filter('revisit', function() {
if (Cookie::get('landingpage')) {
return Redirect::to('/' . Cookie::get('landingpage'));
}
});
<?php
class Question extends Eloquent {
public function getAnswerAttribute($value)
{
return (bool)$value;
}
}
@EspadaV8
EspadaV8 / gist:5506405
Last active December 16, 2015 22:20
Resize Youtube to 720p
document.documentElement.style.overflow = document.getElementsByTagName('body')[0].style.overflow = 'hidden';
document.getElementById('player-api').style.width = '1280px';
document.getElementById('player-api').style.height = '751px';
document.getElementById('player').style.padding = '0px';
.share-button .icon {
width: 16px;
height: 16px;
vertical-align: top;
margin: 0 5px 0 -5px;
@include inlineblock;
background-image: url(../images/m/social-share.png);
&.twitter {
background-position: -18px 0;
}
@EspadaV8
EspadaV8 / qw
Created March 12, 2013 06:38
qw
> cat ~/.gitignore_global develop [3e3d5e4]
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
@EspadaV8
EspadaV8 / q
Created March 12, 2013 06:38
qwe
> cat ~/.gitignore_global develop [3e3d5e4]
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db