hyper-v
via: LIS/lis-next#318
Set-VMVideo -VMName centos -HorizontalResolution 2560 -VerticalResolution 1440 -ResolutionType Single
Get-VMVideo centos
cmd /C "call set arg=%1% &&call set uri=%%arg:explorer://=%% && call echo %%uri%% && call C:\Windows\explorer.exe %%uri:/=\%%" |
via: LIS/lis-next#318
Set-VMVideo -VMName centos -HorizontalResolution 2560 -VerticalResolution 1440 -ResolutionType Single
Get-VMVideo centos
class CustomTask(Task): | |
def on_failure(self, exc, task_id, args, kwargs, einfo): | |
info = '[{0}] failed: {1}'.format(task_id, exc) | |
logger.exception(info, exc_info=exc) | |
super(CustomTask, self).on_failure(exc, task_id, args, kwargs, einfo) | |
def on_success(self, retval, task_id, args, kwargs): | |
global app | |
if app.is_warm_shutdown: | |
app.consumer.connection._default_channel.do_restore = False |
use custom template
{{{files.0.content.html}}}
<script>
document.querySelectorAll('.step-details').forEach(item=>{
item.outerHTML=`<details>${item.innerHTML}</details>`
})
document.querySelectorAll('.step-summary').forEach(item=>{
item.outerHTML=`${item.innerHTML}`
120.52.72.*/original-uri
ip 地址获取脚本
window.success = [];
function test() {
for(var idx=1;idx<255;idx++){
var el = document.createElement('img');
el.src = '//120.52.72.' + idx + '/41.media.tumblr.com/5cb6715c800c5b00969f33c162b317d1/tumblr_nzjh7dPKcD1ssbwqro1_540.png';
#!/bin/bash | |
check_internet_connection() { | |
return $(ping -c 1 www.baidu.com > /dev/null) | |
} | |
SSID=$1 | |
PW=$2 | |
while [ 1 ]; do | |
check_internet_connection |
import sys | |
from optparse import OptionParser | |
from smb.SMBConnection import SMBConnection | |
def main(argv): | |
parser = OptionParser() | |
parser.add_option("-u", "--username", | |
help="windows username that will be used for authentication") | |
parser.add_option("-p", "--password", |
// ==UserScript== | |
// @name 今年GitHub成绩单 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @require http://yckart.github.io/jquery.base64.js/jquery.base64.js | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Smite Chow | |
// @match https://github.com/*?show_current_year_statistic | |
// @match https://github.com/*/graphs/contributors?from=*-01-01&to=*-12-31&type=c |
import binascii | |
file = open('douyin_signature.csv', 'wb') | |
bom = binascii.unhexlify(''.join("EF BB BF".split())) | |
file.write(bom) | |
file.write('unique_id,signature'.encode()) | |
def get_signature(unique_id): | |
import requests | |
response = requests.get(f'https://www.iesdouyin.com/web/api/v2/user/info/?unique_id={unique_id}').json() | |
return response['user_info']['signature'] |
from manimlib.imports import * | |
class Stop(Exception): | |
def __init__(self, last_animations): | |
self.animations = last_animations | |
class Main(Scene): | |
current_month = 1 |