Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.
| easyblock = "MakeCp" | |
| name = "vcflib" | |
| version = "0.1-20150507" | |
| homepage = "https://github.com/ekg/vcflib" | |
| description = "a simple C++ library for parsing and manipulating VCF files, + many command-line utilities" | |
| # You will need to git clone --recursive https://github.com/ekg/vcflib.git | |
| # and then create an archive from that | |
| sources = ['%(name)s-%(version)s.tar.gz'] |
| # Install bioConductor in your new R installation | |
| source("http://bioconductor.org/biocLite.R") | |
| chooseBioCmirror() | |
| biocLite() | |
| # install missing R packages for bioConductor | |
| load("installed_old.rda") | |
| tmp <- installed.packages() | |
| installedpkgs.new <- as.vector(tmp[is.na(tmp[,"Priority"]), 1]) | |
| missing <- setdiff(installedpkgs, installedpkgs.new) |
| class userpackages (packages) { | |
| # magic to get a list of packages that users want | |
| # maybe fill the foreman API with simple inputs from a web page | |
| # the verification would be wether the package is available in configured repositories... | |
| package { $packages: | |
| ensure => latest, | |
| } | |
| } |
| COPY ( | |
| SELECT | |
| datname, | |
| pg_database_size(datname), | |
| pg_size_pretty(pg_database_size(datname)) | |
| FROM | |
| pg_catalog.pg_database | |
| WHERE | |
| datistemplate=false and | |
| datallowconn=true and |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net" | |
| ) | |
| func main() { |
Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.
| package main | |
| import ( | |
| "bytes" | |
| "code.google.com/p/go.crypto/openpgp" | |
| "code.google.com/p/go.crypto/openpgp/armor" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| ) |
| #!/usr/bin/python | |
| """ | |
| To use this to mimic the EC2 metadata service entirely, run it like: | |
| # where 'eth0' is *some* interface. if i used 'lo:0' i got 5 second or so delays on response. | |
| sudo ifconfig eth0:0 169.254.169.254 netmask 255.255.255.255 | |
| sudo ./mdserv 169.254.169.254:80 | |
| Then: | |
| wget -q http://169.254.169.254/latest/meta-data/instance-id -O -; echo | |
| curl --silent http://169.254.169.254/latest/meta-data/instance-id ; echo |
| def test(n): | |
| if n%3==0: return True | |
| if n%5==0: return True | |
| return False | |
| sum(filter(test, range(1000))) |
| def fib(max): | |
| a, b = 1, 2 | |
| while a<max: | |
| yield a | |
| a, b = b, a + b | |
| def even(n): | |
| if n%2==0: return True | |
| return False | |
| sum(filter(even, fib(4000000))) |