Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Pouya Kary ✨ pouyakary

I may be slow to respond.
View GitHub Profile
KhashayarDanesh /
Last active June 9, 2022 07:40 — forked from cvan/
Launch Chromium with API Keys on Linux, macOS and Windows

Sometimes you need to use API Keys to use things like the Speech API. And then you Google a bit and follow all the instructions. But the Chromium Project's API Keys page does a not-so-great of explaining how to do this, so I will.

1. Download Chromium.

2. You'll notice a yellow disclaimer message appear as a doorhanger: Google API Keys are missing. Some functionality of Chromium will be disabled. Learn More.

3. Clicking on that link takes you to the confusing API Keys docs page.

4. If you aren't already, subscribe to the mailing list. (You can just subscribe to the list and choose to not receive any mail. FYI: the Chromium project restricts the APIs to those subscribed to that group - that is, Chromium

orta /
Last active January 13, 2023 05:47
A proposal for improving TS2322 error messages

This is a work in progress. Please don't take this as something that will definitely happen, we all know what happens to well laid plans and I need to present it to the rest of the TypeScript team in order to figure out a lot of feasibility questions.


The examples in this PR assumes [CLI DX] Improve positioning of compiler error messaging info #45717 is merged

In 4.4, all diagnostic messages from TypeScript are treated the same, we have a massive .JSON file of ±2000 diagnostic messages which are used everywhere from compiler messages to CLI help. Aside from some simple string manipulation, these are effectively what we output for all error messages. I'd like to propose that we break this pattern, just for error TS2322.

TS2322 is our 'type x is not assignable to y' error, you'd see it for const str: string = 123 and I expect it is the most seen

orta / tsc-compiler-errors-3.svg
Last active September 6, 2021 10:25
Ideas for TSC with prettier pretty settings - click raw on this svg below
View tsc-compiler-errors-3.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active March 14, 2023 23:48
macOS Big Sur Icon Template for Affinity Photo
macOS Big Sur Icon Template for Affinity Photo (c) by Yoshimasa Niwa
macOS Big Sur Icon Template for Affinity Photo is licensed under a
Creative Commons Attribution 4.0 International License.
You should have received a copy of the license along with this
work. If not, see <>.
Manouchehri / ieee754.js
Created October 13, 2017 19:00 — forked from bartaz/gist:1119041
Convert JavaScript number to string of 64bit double precision floating point representation (IEEE 754)
View ieee754.js
// Convert a JavaScript number to IEEE-754 Double Precision
// value represented as an array of 8 bytes (octets)
function toIEEE754(v, ebits, fbits) {
var bias = (1 << (ebits - 1)) - 1;
// Compute sign, exponent, fraction
4np / ambientLightSensor.swift
Created January 24, 2017 23:33
Acces Mac OS Ambient Light Sensor
View ambientLightSensor.swift
func getLux() {
guard let serviceType = IOServiceMatching("AppleLMUController") else {
debugPrint("No ambient light sensor")
// get and release service
let service = IOServiceGetMatchingService(kIOMasterPortDefault, serviceType)
defer {
tomysmile /
Last active March 6, 2023 07:23
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
rdavisau / dark-style-from-vs-2015.json
Created February 25, 2016 04:26
View dark-style-from-vs-2015.json
"description":"Imported color scheme",
"originator":"Imported from /Users/rdavis/Library/XamarinStudio-5.0/HighlightingSchemes/dark-style-from-vs-2015.vssettings",
{"name": "Background(Read Only)", "color":"#1E1E1E" },
{"name": "Search result background", "color":"#005F60" },
{"name": "Search result background (highlighted)", "color":"#007F80" },
{"name": "Fold Square", "color":"#A5A5A5" },
bcoles / Life.HC.Z
Last active August 28, 2022 17:37
Conway's Game of Life in HolyC for TempleOS. Ported from Rosetta Code. Original C Source:'s_Game_of_Life#C
View Life.HC.Z
// Conway's Game of Life in HolyC for TempleOS
// Ported from Rosetta Code. Original C Source:
// -'s_Game_of_Life#C
#define WIDTH 60
#define HEIGHT 40
#define SLEEP 100
U32 Universe[HEIGHT][WIDTH];
Peter-Juhasz / vs.css
Last active August 18, 2016 19:50
Visual Studio Theme for Monaco Editor
View vs.css
.monaco-editor .current-line {
background: none !important;
border: none !important;
.monaco-editor .cursors-layer > .cursor {
width: 1px !important;
.monaco-editor .bracket-match {