# /etc/modprobe.d/blacklist.conf
blacklist radeon # nvidia, i915, depends on hardware specs
blacklist iTCO_wdt # who wants watchdog on desktop tbh? (except shutdown might not work properly xD)
blacklist iTCO_vendor_support # watchdog
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |
With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.
Note that:
- you shouldn't change the modifier keys mapping with keyboard DIP. This script assumes you use a standard PC keyboard layout, and wish to use shortcuts as if it was a mac keyboard layout.
- To use
cmd + shift + ↑ / ↓ / ← / →
(select text between cursor and top / bottom / beginning of line / end of line), You should disable theBetween input languages
shotcut fromControl Panel\Clock, Language, and Region\Language\Advanced settings > Change lanugage bar hot keys
due to conflicting.
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 numpy as np | |
from numpy import linalg as LA | |
class Activation: | |
def f(self, x, **args): | |
raise NotImplementedError("Should have implemented this") |
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
from threading import BoundedSemaphore | |
from concurrent.futures import ProcessPoolExecutor | |
class MaxQueuePool: | |
"""This Class wraps a concurrent.futures.Executor | |
limiting the size of its task queue. | |
If `max_queue_size` tasks are submitted, the next call to submit will block | |
until a previously submitted one is completed. |
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
$win_user = "ipc" | |
$linux_user = "ipc" | |
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" | |
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs" | |
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin") | |
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") } | |
Add-MpPreference -ExclusionPath $base_path |
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
{"卧":"臣卜","项":"工页","功":"工力","攻":"工攵","荆":"茾刂","邪":"牙阝","雅":"牙隹","期":"其月","欺":"其欠","斯":"其斤","鞭":"革便","勒":"革力","划":"戈刂","敬":"苟攵","鹳":"雚鸟","欧":"区欠","切":"七刀","鞋":"革圭","鄞":"堇阝","勤":"堇力","陌":"阝百","陈":"阝东","隐":"阝急","降":"阝夅","队":"阝人","防":"阝方","院":"阝完","阳":"阝日","际":"阝示","阴":"阝月","除":"阝余","险":"阝佥","隔":"阝鬲","障":"阝章","阶":"阝介","陀":"阝它","阵":"阝车","阿":"阝可","隘":"阝益","陵":"阝夌","陷":"阝臽","陶":"阝匋","陪":"阝咅","陕":"阝夹","陆":"阝击","阻":"阝且","孙":"子小","孔":"子乚","孩":"子亥","孤":"子瓜","职":"耳只","聩":"耳贵","聘":"耳甹","取":"耳又","聊":"耳卯","聪":"耳总","耻":"耳止","联":"耳关","聆":"耳令","耿":"耳火","耽":"耳冘","预":"予页","豫":"予象","双":"又又","对":"又寸","戏":"又戈","欢":"又欠","观":"又见","难":"又隹","鸡":"又鸟","艰":"又艮","驻":"马主","骚":"马蚤","驯":"马川","骆":"马各","骑":"马奇","驱":"马区","驰":"马也","骇":"马亥","驶":"马史","验":"马佥","骏":"马夋","骄":"马乔","驴":"马户","骤":"马聚","驳":"马爻","胡":"古月","故":"古攵","鸪":"古鸟","郁":"有阝","耐":"而寸","肆":"镸聿","雄":"厷隹","励":"厉力","耗":"耒毛","艳":"丰色","耕":"耒井","确":"石角","破":"石皮","础":"石出","碑":"石卑","研":"石开","碎":"石卒","碾":"石展","硕":"石页","磁":"石兹","碟":"石枼","砸":"石匝","碌":"石录","砖":"石专","碗":"石宛","砰":"石平","磕":"石盍","硬":"石 |
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
server { | |
listen 80; | |
server_name your.domain.com; | |
location = /analytics.js { | |
# you have to compile nginx with http://nginx.org/en/docs/http/ngx_http_sub_module.html (this is not default) | |
# and http://nginx.org/en/docs/http/ngx_http_proxy_module.html (it's a default module) | |
proxy_set_header Accept-Encoding ""; |
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
var idb = require('idb-chunk-store') | |
var WebTorrent = require('webtorrent') | |
var client = new WebTorrent() | |
//Sintel MagnetURI taken from https://webtorrent.io/ | |
var sintel = "magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F" | |
function addTorrent(info){ | |
var torrent = client.add(info, {"store": idb}) |
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
modprobe ipv6 | |
ip tunnel add he-ipv6 mode sit remote 216.66.84.42 local 178.172.151.170 ttl 255 | |
ip link set he-ipv6 up | |
ip addr add 2001:470:b841::1/48 dev he-ipv6 | |
ip route add ::/0 dev he-ipv6 | |
ip -f inet6 addr | |
for i in {100..200}; do | |
ip addr add "2001:470:b841:$i::1/48" dev he-ipv6 | |
done |
NewerOlder