注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件��理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>RecordRTC over Socket.io</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<script src="https://www.WebRTC-Experiment.com/RecordRTC.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script> |
** 由于此文年事已久,可能某些URL Schemes已失效,可在评论区留言指出!(最后更新于 2024.4.16)
由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在APP之间跳转的方法:URL Scheme。简单的说,URL Scheme就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的URL Scheme都是不一样的,如果存在一样的URL Scheme,那么系统就会响应先安装那个 APP 的URL Scheme,因为后安装的 APP 的URL Scheme被覆盖掉了,是不能被调用的。
#!/usr/bin/env python3 | |
from ast import parse | |
from ast import AST, FunctionDef, Lambda, Call | |
from collections import Iterable | |
# some notes | |
# kwargh: | |
# when you're using matplotlib or pandas | |
# and you do help(func) to figure out what |
Полезные ключи программы psql | |
-U - Указываем пользователя, например postgres | |
-W - Приглашение на ввод пароля | |
-d название_БД - Подключение к БД название_БД | |
-h имя_хоста - Подключение к хосту имя_хоста | |
-p порт - По какому порту постгря ожидает подключения | |
-c команда - Выполнение команды SQL без выхода в интерактивный режим | |
-f file.sql - Выполнение команд из файла file.sql | |
-S - Однострочный режим, то есть, переход на новую строку будет выполнять запрос (избавляет от ; в конце конструкции SQL) |
{ | |
// open json editor for settings | |
"workbench.settings.editor": "json", | |
// Theme | |
"workbench.colorTheme": "Aura Dark", | |
"workbench.iconTheme": "moxer-icons", | |
// Change font | |
"editor.fontFamily": "Geist Mono", |
import socket | |
import ssl | |
from tls_server import HOST as SERVER_HOST | |
from tls_server import PORT as SERVER_PORT | |
HOST = "127.0.0.1" | |
PORT = 60002 | |
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
// start with: | |
// frida -U -l pinning.js -f [APP_ID] --no-pause | |
Java.perform(function () { | |
console.log('') | |
console.log('===') | |
console.log('* Injecting hooks into common certificate pinning methods *') | |
console.log('===') | |
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager'); |
// NOTE: time string must look like this 07:05:45PM or this 07:05:45AM and account for 12:00:00AM and convert 12:00:00pm to 12:00:00 | |
function timeConversion(s) { | |
const ampm = s.slice(-2); | |
const hours = Number(s.slice(0, 2)); | |
let time = s.slice(0, -2); | |
if (ampm === 'AM') { | |
if (hours === 12) { // 12am edge-case | |
return time.replace(s.slice(0, 2), '00'); | |
} | |
return time; |