Skip to content

Instantly share code, notes, and snippets.

@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
@EGARRISXN
EGARRISXN / my-regex-tutorial.md
Created April 24, 2024 15:51
This is a tutorial that explains how a specific regular expression, or regex, functions by breaking down and describing each part of the expression.

My Regex Tutorial!

This tutorial on Regular Expression (Regex) aims to assist you in comprehending and establishing the order of unique characters for validating a search term. A Regex refers to a sequence of characters that outlines a particular search pattern. Whether incorporated into code or search algorithm, regular expressions enable the identification of specific character patterns within a string, as well as the identification and substitution of individual characters or sequences of characters within a string. Moreover, they are commonly employed for validating input data.

Summary

This tutorial will show you how to harness the power of regular expressions to manipulate text based on specific patterns.

Let us explore how to utilize regex for matching emails using the expression /^([a-z0-9_.-]+)@([\da-z.-]+).([a-z.]{2,6})$.

@Souhaylb
Souhaylb / commits_stats.md
Last active April 24, 2024 15:55
codestats

🌞 Morning 16 commits β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 8.1% πŸŒ† Daytime 49 commits β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 24.7% πŸŒ™ Night 133 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘ 67.2%

@rxb
rxb / feathersJsAppleSignIn.md
Last active April 24, 2024 15:51
Sign in with Apple + FeathersJS: how to implement Apple's OAuth flow with FeathersJS

Sign in with Apple + FeathersJS

Upgrade to FeathersJS 5

FeathersJS uses a package called Grant for most of the OAuth functionality. Grant now supports the Apple OAuth flow, but only in recent versions. FeathersJS v5 (currently in prerelease) uses this new Apple-supporting version of Grant. For this reason, I would suggest first upgrading to FeathersJS v5 (Dove) https://dove.docs.feathersjs.com/guides/migrating.html

Pick a domain for localhost

Sign in with Apple does NOT work with servers set up as localhost. If you haven't already, you'll need to pick a domain for your FeatherJS server. If your main domain is example.com, you might want to pick a subdomain like devapi.example.com. You won't need to change the domain's real dns for this, you can add the alias to your /etc/hosts file:

@itod
itod / split_keyboards.md
Last active April 24, 2024 15:55
Every "split" mechanical keyboard currently being sold that I know of