Skip to content

Instantly share code, notes, and snippets.

View nonkr's full-sized avatar
🎯
Focusing

Nonkr nonkr

🎯
Focusing
  • Hangzhou, China
View GitHub Profile
@echo off&cls
for %%* in (.) do set PROJECT=%%~nx*
set DISTFILE=cmakelist.tmp.txt
if exist %DISTFILE% del %DISTFILE%
echo cmake_minimum_required(VERSION 3.3.2)>>%DISTFILE%
echo project(%PROJECT%)>>%DISTFILE%
echo set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")>>%DISTFILE%
echo.>>%DISTFILE%
Rtp_pt_map arr_pt_maps[] = {
{ 0, "ITU-T G.711 PCMU" },
{ 1, "USA Federal Standard FS-1016" },
{ 2, "ITU-T G.721" },
{ 3, "GSM 06.10" },
{ 4, "ITU-T G.723" },
{ 5, "DVI4 8000 samples/s" },
{ 6, "DVI4 16000 samples/s" },
{ 7, "Experimental linear predictive encoding from Xerox PARC" },
{ 8, "ITU-T G.711 PCMA" },
@nonkr
nonkr / gdbinit
Last active November 6, 2016 05:27
gdbinit
set print pretty on
define phs
if $argc != 2
help phs
else
set $_i = 0
if $arg1 > 0
echo \033[34m
while ($_i < $arg1)
@nonkr
nonkr / Darcula copy.icls
Created November 21, 2017 05:43
CLion C/C++ Color Scheme
<scheme name="Darcula copy" version="142" parent_scheme="Darcula">
<option name="FONT_SCALE" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<option name="EDITOR_LIGATURES" value="true" />
<attributes>
<option name="OC.DIRECTIVE">
<value>
<option name="FOREGROUND" value="80b000" />
</value>
@nonkr
nonkr / hshy_checkin.py
Created April 13, 2018 17:35 — forked from ficapy/hshy_checkin.py
练手python脚本,登陆Discuz论坛打卡签到
# -*- coding: utf-8 -*-
import requests
import hashlib
import re
username = '' ###账号###
password = ''###密码###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \
Chrome/27.0.1453.116 Safari/537.36"
headers = {
@echo off
adb devices
set "destdir=%date:~,4%-%date:~5,2%-%date:~8,2%"
if not exist %destdir% (
md %destdir%
)
echo pull /tmp/phase.bin
adb pull -p /tmp/phase.bin %destdir%/phase_%1.bin
#!/bin/sh
IMAGES=$(docker images | awk '{print $1":"$2}')
echo "Saving images to tar files."
for image in ${IMAGES}; do
if [ ${image} != "REPOSITORY:TAG" ];then
echo "==> Saving ${image}......\c"
tar=$(echo -n ${image} | base64)