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 ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"strings" | |
) |
package main | |
import ( | |
"fmt" | |
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" | |
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" | |
) | |
func main() { |
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: some-sftp-server | |
Parameters: | |
HostedZoneIdParam: | |
Type: String | |
Description: Hosted Zone ID | |
SFTPHostnameParam: | |
Type: String |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
### Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. |
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 |
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a | |
function! s:align() | |
let p = '^\s*|\s.*\s|\s*$' | |
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) | |
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) | |
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) | |
Tabularize/|/l1 | |
normal! 0 | |
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) |