Skip to content

Instantly share code, notes, and snippets.

View zhanglongqi's full-sized avatar

Zhang LongQi zhanglongqi

View GitHub Profile
@zhanglongqi
zhanglongqi / xz.markdown
Created February 18, 2021 09:23 — forked from fabiomontefuscolo/xz.markdown
XZ and tricks

XZ

  1. Compress a file (filename.sql will be replaced by filename.sql.xz)
xz filename.sql
  1. Uncompress file (filename.sql.xz will be replaced by filename.sql)
@zhanglongqi
zhanglongqi / .clang-format
Last active February 18, 2020 13:56 — forked from kristopherjohnson/.clang-format
Script that runs clang-format on files in a set of directories
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
@zhanglongqi
zhanglongqi / osx_wifi_strenght_command_line.sh
Created March 11, 2019 09:26 — forked from miglen/osx_wifi_strenght_command_line.sh
Mac OS X Wifi Signal strength meter command line
#!/bin/bash
# Simple command to display the wireless strenght signal
#
clear
while x=1
do /System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I \
| grep CtlRSSI \
| sed -e 's/^.*://g' \
| xargs -I SIGNAL printf "\rWifi dBm: SIGNAL"
sleep 0.5
@zhanglongqi
zhanglongqi / unique-val-col-calc
Created September 5, 2017 15:12 — forked from arthurleon/unique-val-col-calc
Get unique values of a column in Libre Office Calc
Select the whole column
Data > Filter > Standard Filter
Change 'Field Name' to -none- , click on 'More options' and check on 'No duplication' box
Source: http://superuser.com/questions/238656/openoffice-get-distinct-values-from-column
@zhanglongqi
zhanglongqi / queue_0.py
Created May 16, 2016 06:53 — forked from anonymous/queue_0.py
queue_howto
# from multiprocessing import Process
# import os
#
#
# def info(title):
# print(title)
# print('module name:', __name__)
# print('parent process:', os.getppid())
# print('process id:', os.getpid())
#