Skip to content

Instantly share code, notes, and snippets.

View x13945's full-sized avatar
😀
I may be slow to respond.

Shaw x13945

😀
I may be slow to respond.
View GitHub Profile
@x13945
x13945 / GenerateHexCode.js
Created May 23, 2019 07:39
生成iterm中快捷键需要对hex code
function toHex(str) {
var result = '';
for (var i = 0; i < str.length; i++) {
result += `0x${str.charCodeAt(i).toString(16)} `;
}
return result;
}
let res = toHex('http')
console.log('====================================');
#!/bin/sh
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
@x13945
x13945 / logcatPkg.py
Created December 4, 2019 15:13
Android adb tools
#!/usr/bin/env python
#coding:utf-8
#This script is aimed to grep logs by application(User should input a packageName and then we look up for the process ids then separate logs by process ids).
import os
import sys
packageName=str(sys.argv[1])
def getDeviceId():
@x13945
x13945 / GitlabGroupCloning.sh
Created December 31, 2021 09:27 — forked from truongngoclinh/GitlabGroupCloning.sh
Clone all projects in gitlab group
#!/usr/bin/env bash
BASE_PATH="your domain"
GITLAB_PRIVATE_TOKEN="your private token"
if [ -z "$1" ]
then
echo "group name is required."
exit 1;