Skip to content

Instantly share code, notes, and snippets.

View idawnlight's full-sized avatar
🤔
Somehow it works.

Light idawnlight

🤔
Somehow it works.
View GitHub Profile
@idawnlight
idawnlight / karabiner_shift.json
Created May 19, 2022 11:02
Use shift to switch input sources
{
"title": "Use shift to switch input sources",
"rules": [
{
"description": "Use left_shift to switch input sources",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [

Keybase proof

I hereby claim:

  • I am idawnlight on github.
  • I am idawnlight (https://keybase.io/idawnlight) on keybase.
  • I have a public key ASDAb-kc5lV3qAgwoF7b8wPpNU87EU7EX1GWHWJJxgPGqQo

To claim this, I am signing this object:

@idawnlight
idawnlight / 163key.php
Created July 25, 2020 06:03
decrypt 163key
<?php
function decrypt($ciphertext) {
$cipher = "AES-128-ECB";
$key = "#14ljk_!\]&0U<'(";
$c = base64_decode($ciphertext);
$ivlen = openssl_cipher_iv_length($cipher);
$iv = substr($c, 0, $ivlen);
$ciphertext_raw = substr($c, $ivlen);
return openssl_decrypt($ciphertext_raw, $cipher, $key, OPENSSL_RAW_DATA, $iv);
}
@idawnlight
idawnlight / cloudflare-update-record.sh
Last active April 3, 2020 15:05 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash (edited)
#!/bin/bash
# CHANGE THESE
auth_email="[email protected]"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s --ipv4 ip.sb)
@idawnlight
idawnlight / cloudSettings
Created March 24, 2019 15:43 — forked from xtlsoft/cloudSettings
Visual Studio Code Public Settings
{"lastUpload":"2018-10-05T09:07:31.862Z","extensionVersion":"v3.1.2"}
@idawnlight
idawnlight / merge.php
Created August 26, 2017 02:53
合并 Bilibili 下载的视频/电影
<?php
echo "Making a list..." . "\n";
foreach(scandir("./") as $name) {
if (preg_match_all("/[0-9]+-(.*)-hd.flv/", $name, $id)) {
$file[$id[1][0]] = $name;
}
}
if (empty($file)) {
@idawnlight
idawnlight / http-git.bat
Created July 14, 2017 05:37
HTTP Git 仓库
rmdir /s/q material.tmp.git
git clone --bare https://github.com/LiMingYuGuang/typecho-theme-material.git material.tmp.git
rmdir /s/q material.git
ren material.tmp.git material.git
cd material.git
cd hooks
ren post-update.sample post-update
echo ./post-update >> update.sh
.\update.sh
cd ..\..\
@idawnlight
idawnlight / fix-0x80240034.bat
Created June 28, 2017 11:44
修复在Windows Update时遇到的0x80240034
net stop wuauserv
net Stop cryptSvc
net Stop bits
net Stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old