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
-- MySQL dump 10.13 Distrib 5.7.34, for osx10.16 (x86_64) | |
-- | |
-- Host: 127.0.0.1 Database: playground | |
-- ------------------------------------------------------ | |
-- Server version 5.7.34 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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
// int64 version, iterate through slice in chunk, breaks on first error. | |
func IterateSliceInChunk(slice []int64, chunkSize int, work func([]int64) error) error { | |
if chunkSize < 1 { | |
panic("chunk size is below one") | |
} | |
var offset = 0 | |
var err error | |
for err == nil { | |
lower, upper := offset, offset+chunkSize | |
if upper >= len(slice) { |
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
<LanguageInjectionConfiguration> | |
<injection language="XPath" injector-id="python"> | |
<display-name>XPath</display-name> | |
<place><![CDATA[pyLiteralExpression().and(pyMethodArgument("xpath", 0, "lxml.etree._Element._Element"))]]></place> | |
</injection> | |
</LanguageInjectionConfiguration> |
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
USERNAME=enihsyou | |
mkdir -p ~/.ssh | |
if ! [[ -f ~/.ssh/authorized_keys ]]; then | |
echo "Creating new ~/.ssh/authorized_keys" | |
touch ~/.ssh/authorized_keys | |
fi | |
keys=`curl https://api.github.com/users/$USERNAME/keys | grep -o -E "ssh-\w+\s+[^\"]+"` |
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
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} %highlight(%-5level) %white(-) %black(%msg) | |
%white(%replace(%caller{3}){'Caller\+\d\t', ' '})</pattern> | |
</encoder> | |
</appender> |
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
# -*- coding:utf-8 -*- | |
# Problem: https://pad.251.sh/s/jcS1ea2t5 | |
# Author: Kujo Ryoka | |
from unittest import TestCase | |
class Maze: | |
def __init__(self, map, n, m, x, y): | |
self.ans = 0 # 最短步长结果 |
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 bash | |
# Author: Ryoka Kujo [email protected] | |
# Descripthon: Network tweaking script to make Internet access available | |
# while connection to Pulse Secure VPN. | |
# network interface list can be retrieved by `networksetup -listallhardwareports` | |
# specify your network interface for internet access. | |
PUBLIC_INTERFACE=en7 | |
# specify your network interface for VPN tunnel access. | |
TUNNEL_INTERFACE=utun2 |
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
package encryptdecrypt; | |
import java.io.IOException; | |
import java.io.PrintStream; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
public final class Main { | |
private Main() {} |
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
from urllib.request import urlopen | |
from urllib.parse import unquote | |
import base64 | |
import re | |
n3ro_rss_link = input("N3RO SIP002 URIs: ").strip() | |
data = urlopen(n3ro_rss_link).read() | |
links = base64.b64decode(data).decode() | |
for link in links.splitlines(): |