Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# http://stackoverflow.com/questions/51233/how-can-i-retrieve-the-page-title-of-a-webpage-using-python
import sys
import six
from six.moves import html_parser
from six.moves import urllib
from six.moves import http_cookiejar
from six.moves import socketserver
from BeautifulSoup import BeautifulSoup
{
"_links": {
"account:update": {
"href": "/account"
},
"apigateway:api-keys": {
"href": "/apikeys"
},
"apigateway:client-certificates": {
"href": "/clientcertificates"
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/vaughan0/go-ini"
"net/url"
"os"
@joshuadfranklin
joshuadfranklin / gist:5b2cf8495dba4960642c
Created May 31, 2015 20:56
chromiumos gbb flags on Acer c720
Default flags 0x0
sudo /usr/share/vboot/bin/set_gbb_flags.sh -d 0x489
flashrom v0.9.4 : 0fd37a2 : Feb 11 2015 23:05:29 UTC on Linux 3.8.11 (x86_64), built with libpci 3.1.10, GCC 4.9.x-google 20140827 (prerelease), little endian
Reading flash... SUCCESS
Setting GBB flags from flags: 0x00000000 to 0x489..successfully saved new image to: /tmp/tmp.T8G57Od06U
flashrom v0.9.4 : 0fd37a2 : Feb 11 2015 23:05:29 UTC on Linux 3.8.11 (x86_64), built with libpci 3.1.10, GCC 4.9.x-google 20140827 (prerelease), little endian
Erasing and writing flash chip... Verifying flash... VERIFIED.
SUCCESS
$ curl -v -w "\nHTTP %{http_code} %{time_connect} %{time_starttransfer} %{time_total}\n" http://127.0.0.1:8182/
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8182 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8182
> Accept: */*
>
< HTTP/1.1 200 OK
#!/usr/bin/env python
import sys
import boto
import pprint
del_flag = ''
if len(sys.argv) > 1:
del_flag = sys.argv[1]
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst curl
cinst vim
cinst sysinternals
cinst MobaXTerm
#!/usr/bin/python
import boto
import math
# Use boto to Copy an Object greater than 5 GB Using S3 Multipart Upload API
# probably could be made more pythonesque, based directly off the AWS Java example
# Copy an Object [greater than 5 GB] Using the AWS SDK for Java [S3] Multipart Upload API
# http://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingLLJavaMPUapi.html
# copy in same bucket as a simple test