Skip to content

Instantly share code, notes, and snippets.

@tommai78101
tommai78101 / unicode.c
Last active April 30, 2024 21:27
UTF-8 to UTF-16 one-way conversion, written in C
#include <stdio.h>
#include <stdlib.h>
#include <uchar.h>
#include <locale.h>
#define __STD_UTF_16__
//Pointer arrays must always include the array size, because pointers do not know about the size of the supposed array size.
void utf8_to_utf16(unsigned char* const utf8_str, int utf8_str_size, char16_t* utf16_str_output, int utf16_str_output_size) {
//First, grab the first byte of the UTF-8 string
@lujanfernaud
lujanfernaud / back_pain_stretches_with_stuart_mcgill.md
Last active April 30, 2024 21:26
Back Pain: Stretches with Stuart McGill

Back Pain: Stretches with Stuart McGill

The Cat Camel

Get on all fours and slowly move back and forth from a downward spinal curve with the head looking up like a cat and then move into a rounded spine while the head looks down like a camel. Each cycle should take about three to four seconds. 7-8 cycles are all that is needed.

Gist: Only do 7-8 cycles. More than that could be bad.

Video: https://www.youtube.com/watch?t=96&v=bcbuhePZZj0

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
%% setup
hold all
a=arduino;
mpu=i2cdev(a,'0x68'); %mpu adress is normally 0x68
writeRegister(mpu, hex2dec('B6'), hex2dec('00'), 'int16'); %reset
data=zeros(10000,14,'int8'); %prelocating for the speed
j=1;
a1 = animatedline('Color',[1 0 0]);
a2 = animatedline('Color',[0 1 0]);
a3 = animatedline('Color',[0 0 1]);
Email: 982092332@qq.com
SN: GAWAE-FCWQ3-P8NYB-C7GF7-NEDRT-Q5DTB-MFZG6-6NEQC-CRMUD-8MZ2K-66SRB-SU8EW-EDLZ9-TGH3S-8SGA
@KaMeHb-UA
KaMeHb-UA / .bashrc
Created March 18, 2018 16:13
Beautiful and useful .bashrc example for TRUECOLOR terminals
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@letanure
letanure / estados-cidades.json
Last active April 30, 2024 21:21
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@bcnzer
bcnzer / postman-pre-request.js
Last active April 30, 2024 21:20
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@Dlfaith
Dlfaith / gist:0d43be3dfb296bb6260af75ef082faa8
Created December 6, 2022 02:51
Free Windows Server 2022 Product Key
Free Windows Server 2022 Standard Product Key
HP9DJ-NK2X6-4QPCH-8HY8H-6X2XY
RRNMT-FP29D-CHKCH-GWQP2-DDDVB
44QN4-X3R72-9X3VK-3DWD6-HFWDM
Free Windows Server 2022 Datacenter Product Key
WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Download windows Sever 2022 Evaluation edition:
Windows Server 2022 Evaluation English
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Z-Index Example</title>
<style>
html, body { background-color: #00787F; }
.container {
position: relative;