Skip to content

Instantly share code, notes, and snippets.

const mutations = [{
patch: {
id: item.id,
set: {
quantity: "222"
}
}
}]
@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 10:54
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@NereaFontecha
NereaFontecha / HomeIntro
Last active May 6, 2024 10:53
async await with Clases
import gsap from 'gsap';
import imagesLoaded from 'imagesloaded';
class HomeIntro{
constructor(){
}
async init(){
const imgLoad = imagesLoaded(document);
return await new Promise((resolve, reject)=> {
@doichev-kostia
doichev-kostia / index.js
Last active May 6, 2024 10:53
OpenAPI typescript codegen for ESM imports
"use strict";
Object.defineProperty(exports, "__esModule", { value: !0 });
var e,
t,
n = require("camelcase"),
r = require("json-schema-ref-parser"),
o = require("os"),
a = require("path"),
l = require("fs-extra");
(exports.HttpClient = void 0),

Those guides are applicable to every 11R/Ace 2 model:

  • OnePlus 11R (CPH2487)
  • OnePlus Ace 2 (PHK110 & PHK110YS)

Navigation

@shimondoodkin
shimondoodkin / php_tiny_curl.php
Last active May 6, 2024 10:51
php tiny curl - a curl function with method, data, headers, cookies, simple to use.
function encodeURIComponent($str) {
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')');
return strtr(rawurlencode($str), $revert);
}
class curl_onHeaders
{
@gaabora
gaabora / php_tiny_curl.php
Created January 9, 2018 09:56 — forked from shimondoodkin/php_tiny_curl.php
php tiny curl - a curl function with method, data, headers, cookies, simple to use.
function encodeURIComponent($str) {
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')');
return strtr(rawurlencode($str), $revert);
}
class curl_onHeaders
{
@nitred
nitred / optimal_mtu.md
Last active May 6, 2024 10:50
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@gaabora
gaabora / batch-style-replace-magic.html
Last active May 6, 2024 10:50
batch-style-replace-magic.html
<!DOCTYPE html>
<html>
<head>
<title>Test report tpl vars</title>
<style>
* { font-size: 10px; }
html, body { margin: 0; padding: 0; }
body { padding: 0 5px; }
.container { height: 100%; display: flex; flex-direction: row; }
.fill-height { height: 100vh; }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Eu te amo Anderson</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">