Skip to content

Instantly share code, notes, and snippets.

View Sciroccogti's full-sized avatar
👣
writing money_tracker weekly

张逸帆 Sciroccogti

👣
writing money_tracker weekly
View GitHub Profile
@higuoxing
higuoxing / seu-fuckoff.py
Created October 30, 2021 10:03
一个恶作剧脚本
#!/usr/bin/env python3
## Usage:
## 1. 查看某个一卡通登录信息.
## $ seu-fuckoff.py -u <一卡通>
## 2. 将某个一卡通对应的终端踢下线.
## $ seu-fuckoff.py -f -u <一卡通>
import argparse
import requests
@tomasbaran
tomasbaran / main.dart
Last active June 22, 2023 11:38
[Flutter template] Save JSON file locally on your phone in Flutter
import 'package:flutter/material.dart';
import 'dart:io';
import 'package:path_provider/path_provider.dart';
import 'dart:convert';
const String kFileName = 'myJsonFile.json';
const InputDecoration kInputDecoration = InputDecoration(
border: OutlineInputBorder(),
labelText: 'Label Text',
);
@zhuchen115
zhuchen115 / rs2options.cpp
Created June 13, 2019 04:56
Reterive all the options of Realsense using librealsense2
#include <iostream>
#include <librealsense2/rs.hpp>
using namespace std;
using namespace rs2;
const char* rs2_option_enum_name(int i);
int main()
{

尝试摆脱手机瘾

手机成瘾原因

  1. 依赖于手机的信息流
  2. 企图保持与外界持续沟通的状态\

待更新

解决方法

  1. GTD
  2. 应用锁
@Mygod
Mygod / export-ble-infos.py
Last active April 22, 2024 17:14
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
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
@arehmandev
arehmandev / changed.yaml
Created September 20, 2017 18:36
Changing value in yaml file in go
Charts:
name: foo
repo: foo.com
tags: realtag
@AGWA
AGWA / rpi-hdmi.sh
Last active March 18, 2024 06:04
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off. X is properly reinitialized when re-enabling.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
tvservice -s | grep "TV is off" >/dev/null
}
case $1 in
@sennajox
sennajox / run_fio.sh
Last active December 21, 2023 11:00
A script that runs fio test and genearates a simple result for each jobs
#!/bin/bash
if [ $# -lt 2 ]; then
echo "usage:$0 dev output_dir [iodepth]"
echo "example 1: Testing the whole block device. Attention: That will destory the filesystem on the target block device"
echo "./run_fio.sh /dev/sdb fio_test"
echo ""
echo "example 2: Testing a file, but not destory filesystem. Suppose the target device mount on /data"
echo "fallocate -l 1G /data/test.dat"
echo "./run_fio.sh /data/test.dat fio_test"
@lotem
lotem / default.custom.yaml
Last active May 6, 2024 07:33
使用 Control 鍵切換中西文,上屏已輸入的編碼;令 Caps Lock 改變字母的大小寫
# 中西文切換鍵的默認設置寫在 default.yaml 裏面
# 以下的 default.custom.yaml 在全局範圍重定義該組快速鍵
#
# 可用的按鍵有 Caps_Lock, Shift_L, Shift_R, Control_L, control_R
# Mac 系統上的鼠鬚管不能區分左、右,因此只有對 Shift_L, Control_L 的設定起作用
#
# 已輸入編碼時按切換鍵,可以進一步設定輸入法中西文切換的形式。
# 可選的臨時切換策略有三:
# inline_ascii 在輸入法的臨時西文編輯區內輸入字母、數字、符號、空格等,回車上屏後自動復位到中文
# commit_text 已輸入的候選文字上屏並切換至西文輸入模式