sudo apt-get update
sudo apt-get install -y xfce-session tightvncserver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When using virtualenvwrapper to manage your python virtual environments, | |
# if you need to move your virtualenvs to a new location, mostly all that is | |
# necessary is to modify your shell initialization scripts (~/.bash_profile, etc.) | |
# But there's a problem waiting to bite you: each virtualenv's activate script has | |
# the path to the virtualenv hard-coded into it by mkvirtualenv. So you need | |
# to edit each one to change this. Otherwise things will not work after moving | |
# things to the new location. This gist is a sample of how to change all the | |
# virtualenvs at once with a little shell script and sed. Run this script | |
# after you've changed the variables in your bash_profile and restarted your | |
# shell. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# on ubuntu: need some utils & dev libs | |
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev | |
# compile nginx | |
cd /tmp | |
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz | |
cd nginx* | |
./configure --with-http_ssl_module --with-http_dav_module \ |
This is a single-purpose fork of vanto's simple liquid tag that helps to easily embed images, videos or slides from OEmbed enabled providers, which in turn uses Magnus Holm's great oembed gem which connects to the OEmbed endpoint of the link's provider and retrieves the HTML code to embed the content properly (i.e. an Image tag for Flickr) This fork allows only Flickr embeds, from one particular album (since that's the way I work my blog) but allows a much simpler tag, not requiring you to type out the whole URL every time.
- Make sure you have the
ruby-oembed
gem (Rubygems, Github) installed. - Copy
flickrimg.rb
to<your-jekyll-project>/_plugins
- Add a "flickrimg" config entry to your
_config.yml
, with an 'album' subentry which contains the bit of the flickr URL that identifies your album. In other words, if you have a Flickr URL such as `
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def a_function(multiply): # multiply should be True or False | |
if multiply: # the caller has asked for a multiplier function | |
def another_func(x): # define a new multiplier function (object) | |
return x*x | |
else: # the caller has asked for a non-multiplier function | |
def another_func(x): # define a new multiplier function (object) | |
return x+x | |
another_func.cheese = "yummy" # Functions are real objects, so they can have arbitrary properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> | |
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> | |
<service-group> | |
<name replace-wildcards="yes">%h</name> | |
<service> | |
<type>_smb._tcp</type> | |
<port>445</port> | |
</service> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Homebrew build logs for gnu-cobol on OS X 10.11.2 | |
Build date: 2015-12-30 15:41:44 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" Generates an nginx configuration for a given site name (with optional params) | |
Requirements: jinja2, click | |
""" | |
# (c) 2016 Peter Hull, use and redistribution granted under the MIT license: | |
# https://opensource.org/licenses/MIT | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo="> | |
<title>Placeholder</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> | |
<style> |
OlderNewer