Skip to content

Instantly share code, notes, and snippets.

View raoulwegat's full-sized avatar

Raoul Wegat raoulwegat

View GitHub Profile
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active March 15, 2024 15:56
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@funzeye
funzeye / WordPress Advanced Custom Field - Responsive Image Field
Last active November 26, 2015 21:53
How To Use Responsive Images in WordPress using Advanced Custom Field's image field and the wp-tevko-responsive-images Plugin
<figure>
<?php
$image = get_field('your_image_field_name');
$atts = array(
'imageid' => $image,
'size1' => '0',
'size2' =>'600',
'size3' =>'1000'
);
echo tevkori_responsive_shortcode($atts) ; ?>
@cee-dub
cee-dub / dnsmasq.conf
Created January 14, 2012 23:23
Generic configuration files for *.#{hostname}.local wildcard DNS with dnsmasq and mDNSResponder
# Add domains for which you want to force to an IP address here.
# This is the magic sauce for making *.#{hostname}
# always route to the localhost
address=/#{hostname}/127.0.0.1
address=/#{hostname}/::1
mx-host=#{hostname},#{hostname},10
# Extra options that make dnsmasq play nice
log-queries
@jcsrb
jcsrb / gist:1081548
Created July 13, 2011 23:05
get avatar from google profiles, facebook, gravatar, twitter, tumblr
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version