Skip to content

Instantly share code, notes, and snippets.

View saghul's full-sized avatar

Saúl Ibarra Corretgé saghul

View GitHub Profile
@saghul
saghul / gist:bc2aa4a4db058f4327ad1894bd360301
Created April 11, 2024 07:38
QuickJS on iOS build warnings
/Users/saghul/src/quickjs/quickjs.h:490:30: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int32_t' (aka 'int')
[-Wshorten-64-to-32]
v = JS_NewInt32(ctx, val);
~~~~~~~~~~~ ^~~
/Users/saghul/src/quickjs/quickjs.h:541:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_EXCEPTION);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/saghul/src/quickjs/quickjs.h:38:31: note: expanded from macro 'js_unlikely'
#define js_unlikely(x) __builtin_expect(!!(x), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~
@saghul
saghul / _theme.scss
Created December 22, 2022 09:19
microblog.pub Dracula theme
// Dracula theme
// https://github.com/dracula/dracula-theme#color-palette
$background: #282a36;
$light-background: #f1fa8c;
$text-color: #f8f8f2;
$primary-color: #bd93f9;
$secondary-color: #ff79c6;
$form-background-color: #44475a;
$form-text-color: #f8f8f2;
@saghul
saghul / index.html
Created February 23, 2021 11:37
Opus RED field trial
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
@saghul
saghul / index.html
Created February 23, 2021 11:32
RED field trial
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
var s = "áéíóúàèëïöüij.áéíóúàèëïöüij";
tell application "Google Chrome"
set bounds of front window to {0, 0, 1440, 900}
end tell
@saghul
saghul / greeter.js
Created August 29, 2019 19:43
Greeter
export function greet(who) {
console.log(`hello ${who}!`);
}
@saghul
saghul / gist:c6ac21991147c7468de928335f14ce71
Created May 31, 2018 15:27
WebRTC M67 build warnings
python build_ios_libs.py
INFO:root:Building WebRTC with args: target_os="ios" ios_enable_code_signing=false use_xcode_clang=true is_component_build=false is_debug=false target_cpu="arm64" ios_deployment_target="9.0" rtc_libvpx_build_vp9=true enable_ios_bitcode=false use_goma=false enable_dsyms=true enable_stripping=true
Done. Made 975 targets from 138 files in 1288ms
INFO:root:Building target: framework_objc
ninja: Entering directory `/Users/scorretge/work/build_webrtc/webrtc/ios/src/out_ios_libs/arm64_libs'
[479/2348] LINK clang_x64/protoc
warning: (x86_64) could not find object file symbol for symbol __ZN6google8protobuf8compiler6csharp29RepeatedMessageFieldGeneratorC1EPKNS0_15FieldDescriptorEiPKNS2_7OptionsE
warning: (x86_64) could not find object file symbol for symbol __ZN6google8protobuf8compiler6csharp29RepeatedMessageFieldGeneratorD1Ev
warning: (x86_64) could not find object file symbol for symbol __ZN6google8protobuf8compiler6csharp29RepeatedMessageFieldGeneratorD0Ev
warning: (x86_64) could not
@saghul
saghul / stream.js
Last active September 27, 2023 02:40
Streaming a webcam to a Jitsi Meet room
const puppeteer = require('puppeteer');
// Streams the first webcam in the system to the specified Jitsi Meet room. Audio is currently
// not sent, but it can be easily enabled by disabling the corresponding setting in `meetArgs`.
//
// TODO
// - Detect if we are kicked from the room
// - Support authenticated deployments
//