This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
import urllib2 | |
import os | |
import urllib, urlparse | |
import xml.etree.cElementTree as et | |
e = et.ElementTree(file=urllib2.urlopen('https://standardebooks.org/opds/all')).getroot() | |
print(e) | |
print("parsing") | |
for atype in e.iter('{http://www.w3.org/2005/Atom}link'): |
<?php | |
// http://hactheplanet.com/blog/11 | |
function cachedHTMLForURL($url) | |
{ | |
// Request the cache from Google. | |
$googleRequestURL = "http://webcache.googleusercontent.com/search?q=" . urlencode("cache:" . $url); | |
$googleResponse = file_get_contents($googleRequestURL); | |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
if (!document.querySelectorAll) { | |
document.querySelectorAll = function (selectors) { | |
var style = document.createElement('style'), elements = [], element; | |
document.documentElement.firstChild.appendChild(style); | |
document._qsa = []; | |
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
window.scrollBy(0, 0); | |
style.parentNode.removeChild(style); |
1. Joomla! | |
2. Drupal | |
3. Mambo | |
4. TYPO3 Enterprise CMS | |
5. WebGUI | |
6. WordPress | |
7. Plone | |
8. Xoops | |
9. PHP Nuke | |
10. eZ Publish |
<!DOCTYPE html> | |
<html lang="es-MX"> | |
<head> | |
<title>logo android</title> | |
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | |
<style type="text/css" media="all"> | |
#perspective-container { position: absolute; top: 0px; width: 264px; height: 336px; background-color: rgba(0,0,0,.05); -moz-transform-style: preserve-3d; -moz-perspective: 800px;} | |
#android { position: absolute; top: 0px; width: 264px; height: 336px;} | |
#android .body { position: absolute; top: 110px; left: 48px; width: 168px; height: 152px; border-radius: 0px 0px 30px 30px; background-color: #ED8415;} | |
#android .head { position: absolute; top: 30px; left: 48px; width: 168px; height: 68px; border-top-left-radius: 50% 100%; border-top-right-radius: 50% 100%; background-color: #ED8415; } |
#!/bin/bash | |
############################################# | |
# | |
# mp4-to-gif | |
# | |
# Convert MP4 videos to GIF images | |
# Requires ffmpeg and imagemagick | |
# | |
# -g and --gifsicle options create a second optimised GIF for your consideration |
<?php | |
/* GDriveCRM | |
Created by Tim Wisniewski (timwis.com) | |
GDriveCMS allows you to use Google Docs' familiar interface for adding content to a mobile-optimized web page. | |
Simply create a Google Document with whatever content you want, publish it to the web (in the File menu), | |
and render it through this script. | |
1. Create a document in Google Drive (Google Docs) | |
2. Go to File > Publish to the web | |
3. Click Start Publishing & check Automatically republish | |
4. Grab the document link (URL) in that dialog |
$.getJSON('https://github.com/users/' + location.pathname.replace(/\//g, '') + '/contributions_calendar_data', weekendWork); | |
function weekendWork(contribs) { | |
var inwe = false, streak = 0, highest = 0, total = 0, possible = 0; | |
contribs.forEach(function (c) { | |
var d = new Date(c[0]).getDay(); | |
if (d === 6) { | |
inwe = true; | |
} else if (d === 0 && inwe) { | |
possible++; | |
if (c[1] !== 0) { |