- Windows Computer (I'm using Win10)
- Linux Computer (I'm using Mint 20.1)
- External Drive
- The largest supported image size is 127GB, so if you have a bunch of personal files on your Windows computer, migrate it to a different drive..
This file contains 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 Foundation | |
//let raw = String.stringWithContentsOfURL(NSURL(string: "http://www.weather.com.cn/data/sk/101010100.html")) | |
struct EasyJSON { | |
var _obj: AnyObject! | |
init(_ obj: AnyObject) { | |
//assert(NSJSONSerialization.isValidJSONObject(obj), "must be valid json object") | |
_obj = obj |
This file contains 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
flatten = lambda lst: reduce(lambda l,i: l + flatten(i) if isinstance(i, (list,tuple)) else l + [i], lst, []) | |
print flatten([2, [2, [4, 5, [7], [2, [6, 2, 6, [6], 4]], 6]]]) | |
# -> [2, 2, 4, 5, 7, 2, 6, 2, 6, 6, 4, 6] |
This file contains 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 python | |
# -*- coding:utf-8 -*- | |
import sys | |
import time | |
import Queue | |
import threading | |
import traceback | |
class ExitException(Exception): |
This file contains 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
flatten = lambda lst: reduce(lambda l, i: l + flatten(i) if isinstance(i, (list, tuple)) else l + [i], lst, []) | |
print flatten([2, [2, [4, 5, [7], [2, [6, 2, 6, [6], 4]], 6]]]) | |
# -> [2, 2, 4, 5, 7, 2, 6, 2, 6, 6, 4, 6] |
This file contains 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
# coding=utf-8 | |
__author__ = 'Vincent Ting' | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Vincent Ting' | |
import cookielib | |
import urllib2 |
This file contains 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
#include <libunwind.h> | |
#include <libunwind-ptrace.h> | |
#include "backtrace.h" | |
#define MAX_BACKTRACE_FRAMES 64 | |
void unwind(pid_t pid) { | |
unw_addr_space_t addr_space = NULL; | |
struct UPT_info* upt_info = NULL; |
This file contains 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
// g++ -o readline_ev -g readline_ev.cpp -g -lreadline -lev | |
// | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <readline/readline.h> | |
#include <readline/history.h> | |
#include <ev.h> | |
#include <fcntl.h> | |
This file contains 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
#include <sys/socket.h> | |
#include <linux/memfd.h> | |
#include <sys/mman.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
void broadcaster( int socket ) | |
{ |
This file contains 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
// Copyright 2018 The gVisor Authors. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
OlderNewer