Skip to content

Instantly share code, notes, and snippets.

View zhonglaoban's full-sized avatar
🌴
On vacation

zhonglaoban zhonglaoban

🌴
On vacation
View GitHub Profile
@miguelmota
miguelmota / uint8_to_hex.cpp
Last active April 5, 2024 12:07
C++ uint8_t to hex string
#include <sstream>
#include <iostream>
#include <iomanip>
std::string uint8_to_hex_string(const uint8_t *v, const size_t s) {
std::stringstream ss;
ss << std::hex << std::setfill('0');
for (int i = 0; i < s; i++) {
@emotality
emotality / duplicate_line_xcode.md
Last active April 6, 2024 04:23
Xcode - Duplicate Line key binding

NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:

New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)


Xcode line duplicate

Bind keys to duplicate lines in Xcode

@subfuzion
subfuzion / curl.md
Last active May 31, 2024 09:45
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.

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 31, 2024 07:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active June 1, 2024 03:14
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S