Skip to content

Instantly share code, notes, and snippets.

View jverdeyen's full-sized avatar

Joeri Verdeyen jverdeyen

View GitHub Profile
@jverdeyen
jverdeyen / yaml.yaml
Created February 26, 2025 13:05 — forked from topdng/yaml.yaml
HA YAML WEATHER HVAC CARDS REDDIT
views:
- title: HVAC
path: hvac
type: sections
sections:
- type: grid
cards:
- type: heading
heading: HVAC
heading_style: title
curl -i http://git.io -F "url=https://github.com/<whatever you like to point to>" -F "code=<preferredcode>"
# Example:
# curl -i http://git.io -F "url=https://github.com/uDig/udig-platform" -F "code=udigPlatform"
# return the following shortened URL : http://git.io/udigPlatform
<?php
define('TEST_KEY', 'are_we_glued');
$redis = new Redis();
try {
$redis->connect('localhost', 6379);
$redis->set(TEST_KEY, 'yes');
$glueStatus = $redis->get(TEST_KEY);
if ($glueStatus) {
$testKey = TEST_KEY;
echo "Glued with the Redis key value store:" . PHP_EOL;
parameters:
...
mailer_transport: smtp
mailer_host: 'localhost:1025'
mailer_user: null
mailer_password: null
#!/bin/bash
# Remove bundle files
rm -rf src/Acme
sed -i '/AcmeDemoBundle/,+2 d' app/config/routing_dev.yml
sed -i '/AcmeDemoBundle/d' app/AppKernel.php
rm -rf web/bundles/acmedemo
# Remove the base template
rm -rf app/Resources/
#!/bin/bash
#
# PHP 5.4 Deprecated function checker
#
# Version: 0.0.3
#
# Original Author: Michiel Roos <[email protected]>
#
# http://www.php.net/manual/de/migration54.incompatible.php
# http://www.php.net/manual/en/migration54.deprecated.php
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
agent.get('https://account.dyn.com/entrance/') do |page|
puts page.title # Output: Create Dyn Account or Login
# Submit the login form
my_page = page.form_with(:action => '/entrance/') do |form|
form.username = "<insert username here>"
@jverdeyen
jverdeyen / nginx.conf
Created October 28, 2012 09:11
Deploy Rails on Ubuntu server 12.04 with Nginx, Unicorn, Mongodb, Mongoid
# This file should be placed on the directory of ~/blog/config
upstream unicorn {
server unix:/tmp/unicorn.todo.socket fail_timeout=0;
}
server {
listen 80 default;
#server_name example.com;
root /home/username/blog/public;
@jverdeyen
jverdeyen / gist:2875173
Created June 5, 2012 13:57 — forked from tinderfields/gist:2863348
Shell: Install chef onto ubuntu 12.04
root@Ubuntu-1204-precise-64-minimal ~ #
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install