Skip to content

Instantly share code, notes, and snippets.

View dmouse's full-sized avatar
🏠
Working from home

David Flores dmouse

🏠
Working from home
View GitHub Profile
@dmouse
dmouse / base.html.twig
Created March 4, 2013 02:54
layout base en twig
{% extends "layout.html.twig" %}
{% block base %}
<div id="header">
{% block header %} My WebPage {% endblock %}
</div>
<div id="content">
{% block content %}{% endblock %}
@dmouse
dmouse / layout.html.twig
Last active December 14, 2015 11:29
Ejemplo de un layout en twig
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
{% block base %}{% endblock%}
</body>
</html>
(function($){
$.randomages = {
defaults: {
path: 'images/',
images: ['image1.jpg','image2.jpg']
}
}
$.fn.extend({
@dmouse
dmouse / battery_nottify.sh
Created November 30, 2012 00:17
Notify my Android | battery charged | NMA
#!/bin/bash
acpi -b |\
grep Battery |\
awk '{
if ( int($4) >= 98 ) {
system("/usr/local/bin/nma Battery Charged \"Desconecta el pinche cargador\" 0 > /dev/null")
}
if ( int($4) < 10 ) {
system("/usr/local/bin/nma Battery Charged \"Conecta el pinche cargador\" 0 > /dev/null")
<?php
#
# Using PHP Web Scraper Goutte in a Console Task in a Silex project
#
# http://www.testically.org/2011/09/30/using-php-web-scraper-goutte-in-a-console-task-in-a-silex-project/
#
namespace Caefer;