Skip to content

Instantly share code, notes, and snippets.

View JunyiXie's full-sized avatar
:octocat:
Focusing

xiejunyi JunyiXie

:octocat:
Focusing
View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active May 31, 2025 17:08
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@jsoffer
jsoffer / simplereader.c
Created February 28, 2016 12:09
libdwarf example
/*
Copyright (c) 2009, David Anderson; 2016, Jaime Soffer.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
@0532
0532 / install.sh
Last active December 30, 2023 09:02
Linux一键安装,卸载JDK8、Tomcat8脚本
#!/bin/bash
#
###############################################
#author: 0532
#email: [email protected]
#date: 2016-06-16
###############################################
base_dir=$(cd "$(dirname "$0")";pwd)
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active June 3, 2025 21:56
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@puttin
puttin / Gemfile
Last active June 28, 2020 11:19
fetch WWDC HD videos' download links
source 'https://rubygems.org'
gem 'httparty'
gem 'nokogiri'
gem 'pry'
@huihut
huihut / Windows10-professional-activation.md
Created August 2, 2018 09:32
Windows10 专业版 激活方法
  1. 以管理员身份运行CMD
  2. slmgr.vbs /upk
  3. slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
  4. slmgr /skms zh.us.to
  5. slmgr /ato

range.sh

#!/bin/sh

PYTHON=python3

${PYTHON} -c 'from sys import version; print(version)'

timeit()

=================================================================
==75136==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 77392 byte(s) in 323 object(s) allocated from:
#0 0x7f499cd10f44 in strdup (/usr/lib/llvm-10/lib/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa5f44)
#1 0x7f47cb88b8ef in pybind11::cpp_function::initialize_generic(pybind11::detail::function_record*, char const*, std::type_info const* const*, unsigned long) (/home/tdimson/anaconda3/envs/voxeloo_cuda112/lib/python3.8/site-packages/open3d/cpu/pybind.cpython-38-x86_64-linux-gnu.so+0x8638ef)
Direct leak of 76032 byte(s) in 432 object(s) allocated from:
#0 0x7f499cd24b6d in malloc (/usr/lib/llvm-10/lib/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xb9b6d)