Skip to content

Instantly share code, notes, and snippets.

/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active April 24, 2024 16:08
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@dragonwocky
dragonwocky / discord-webhook.js
Last active April 24, 2024 16:07
js post request example for discord webhooks using the fetch web api
// node.js versions pre-v0.18.0 do not support the fetch api and require a polyfill
// const fetch = require('node-fetch');
fetch(
'https://discordapp.com/api/webhooks/738983040323289120/mzhXrZz0hqOuUaPUjB_RBTE8XJUFLe8fe9mgeJjQCaxjHX14c3SW3ZR199_CDEI-xT56',
{
method: 'post',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
@priscila225
priscila225 / fix_ima_androidtv.md
Last active April 24, 2024 16:07
Ads/Ima Yellow border displayed while playing ads on AndroidTV / FireTV

I encountered the same issue documented in this GitHub thread: google/ExoPlayer#10370. It pertains to the appearance of a yellow border in IMA (Interactive Media Ads) on Android TV. I faced the same problem while using the media3 library with the IMA extension. To resolve it, I implemented the following function:

fun makeAdViewNonFocusableAndNonClickable() {
    playerView?.adViewGroup?.children?.forEach { child ->
        child.isFocusable = false
        child.isClickable = false
    }
}
@ozdemirburak
ozdemirburak / cities_of_turkey.json
Last active April 24, 2024 16:02
List of cities in Turkey presented in JSON format with the information of name, latitude, longitude, population and region.
[
{
"id": 1,
"name": "Adana",
"latitude": "37.0000",
"longitude": "35.3213",
"population": 2183167,
"region": "Akdeniz"
},
{
local ffi = require('ffi')
--local lib = ffi.load('libraylib.2.0.0.dylib')
local lib = ffi.load('libraylib')
ffi.cdef[[
// Vector2 type
typedef struct Vector2 {
float x;
float y;
} Vector2;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 24, 2024 15:59
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@williamsiuhang
williamsiuhang / shaders-uniform-types
Created February 12, 2019 20:54
Uniform data types for Three js <-> shaders
switch (uniform.type)
{
case 'b':
case 'bool':
case 'boolean':
// single int value
case 'i':
case '1i'
@davidfowl
davidfowl / dotnetlayout.md
Last active April 24, 2024 15:57
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@dodying
dodying / chromium-command-line-switches.md
Last active April 24, 2024 15:56
[List of Chromium Command Line Switches] https://peter.sh/experiments/chromium-command-line-switches/ #chrome #lookup

There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2018-10-20.

Condition Explanation
-- Report pseudo allocation traces. Pseudo traces are derived from currently active trace events.
--/prefetch:1 /prefetch:# arguments to use when launching various process types. It has been observed that when file reads are consistent for 3 process launches with the same /prefetch:# argument, the Windows prefetcher starts issuing reads in batch at process launch. Because reads depend on the process type, the prefetcher wouldn't be able to observe consistent reads if no /prefetch:# arguments were used. Note that the browser process has no /prefetch:# argument; as such a