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
'use strict'; | |
var pkg = require('./package.json'); | |
var gulp = require('gulp'); | |
var utils = require('gulp-util'); | |
var source = require('vinyl-source-stream'); | |
var isWatching = false; | |
var isProduction = process.env.NODE_ENV === 'production'; |
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
~ diskutil list | |
/dev/disk0 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *121.3 GB disk0 | |
1: EFI EFI 209.7 MB disk0s1 | |
2: Apple_CoreStorage 120.5 GB disk0s2 | |
3: Apple_Boot Recovery HD 650.1 MB disk0s3 | |
/dev/disk1 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: Apple_HFS Macintosh HD *120.1 GB disk1 |
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 unittest | |
from xmldiff import XmlDiff | |
class XMLDiffTestCase(unittest.TestCase): | |
def test_xml_equal(self): | |
xml1 = """<a></a>""" | |
xml2 = """<a></a>""" | |
self.assertTrue(XmlDiff(xml1, xml2).equal()) |
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 json | |
import unittest | |
import xmltodict | |
class XmlDiff(object): | |
def __init__(self, xml1, xml2): | |
self.dict1 = json.loads(json.dumps((xmltodict.parse(xml1)))) | |
self.dict2 = json.loads(json.dumps((xmltodict.parse(xml2)))) |
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
# Easier way to install FreeBSD 10 on a Dedibox using the rescue system | |
# - no vnc | |
# - no qemu network unable to join the host network issue | |
sudo su - | |
apt-get update && apt-get install qemu | |
wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso | |
qemu-system-x86_64 -no-kvm -hda /dev/sda -cdrom FreeBSD-10.1-RELEASE-amd64-disc1.iso -curses -boot d | |
# Then |
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
C54A 0330 D1E5 6239 52E5 6638 E3E2 BD4F 3630 BCCF |
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 tclsh | |
set var(user) $env(USER) | |
# * Calculate current system uptime | |
set uptime [exec -- /usr/bin/cut -d. -f1 /proc/uptime] | |
set up(days) [expr {$uptime/60/60/24}] | |
set up(hours) [expr {$uptime/60/60%24}] | |
set up(mins) [expr {$uptime/60%60}] | |
set up(secs) [expr {$uptime%60}] |