Skip to content

Instantly share code, notes, and snippets.

@rsms
rsms / macos-distribution.md
Last active May 14, 2024 11:15
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@wojteklu
wojteklu / clean_code.md
Last active May 14, 2024 11:15
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 14, 2024 11:15
Files for PlayStation BIOS Files NA-EU-JP
@srikiranvelpuri
srikiranvelpuri / refreshOAuthToken.js
Last active May 14, 2024 11:13
Postman PreRequestScript to check if an OAuth token has expired and, if so, refreshes it by making a new authentication request.
const expiryDate = new Date(pm.environment.get('tokenExpiryDate'));
const currDate = new Date(Date.now());
const isTokenExpired = (isNaN(expiryDate) || expiryDate) < currDate;
if(isTokenExpired){
pm.sendRequest({
url: pm.globals.get("oAuthUrl"),
method: 'POST',
header: {
'Authorization': pm.globals.get("basicAuth"),
@v1mkss
v1mkss / JetBrains Activation.md
Last active May 14, 2024 11:13
JetBrains Activation

JetBrains Activation

  • No proxy for:
*.apache.org, *.github.com, *.github.io, *.githubusercontent.com, *.gitlab.com, *.google.com, *.gradle.org, *.jetbrains.space, *.maven.org, cache-redirector.jetbrains.com, cloudconfig.jetbrains.com, download-cdn.jetbrains.com, download.jetbrains.com, downloads.marketplace.jetbrains.com, ea-report.jetbrains.com, github.com, gitlab.com, google.com, gradle.org, jcenter.bintray.com, plugins.jetbrains.com, resources.jetbrains.com, www.jetbrains.com

Activation Key:

UX394X3HLT-eyJsaWNlbnNlSWQiOiJVWDM5NFgzSExUIiwibGljZW5zZWVOYW1lIjoiSG9uZ2lrIFVuaXZlcnNpdHntmY3snbXrjIDtlZnqtZAiLCJsaWNlbnNlZVR5cGUiOiJDTEFTU1JPT00iLCJhc3NpZ25lZU5hbWUiOiLkvJfliJvkupEg5bel5L2c5a6kIiwiYXNzaWduZWVFbWFpbCI6ImhhbmF6YXdhbWl0b0BnbWFpbC5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEyLTEzIiwiZXh0ZW5kZ
@dukejones
dukejones / mydomain.com.conf
Created October 1, 2023 05:12
SvelteKit Nginx config -- nodejs adapter
upstream sveltekit-server {
server 127.0.0.1:3000;
keepalive 8;
}
server {
listen 80;
server_name mydomain.com;
root /home/deploy/frontend/build/client;
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active May 14, 2024 11:10 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@vratiu
vratiu / .bash_aliases
Last active May 14, 2024 11:12
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
ac_add_options --enable-artifact-builds
# ac_add_options --with-ccache=/usr/local/bin/ccache
ac_add_options --enable-debug-js-modules
# ac_add_options --enable-debug
# ac_add_options --with-branding=browser/branding/official
# ac_add_options --with-branding=browser/branding/aurora
# ac_add_options --enable-official-branding
@Longhanks
Longhanks / .config chromium-flags.conf
Last active May 14, 2024 11:09
chromium --enable-gpu-rasterization --enable-zero-copy --enable-accelerated-video-decode
--enable-accelerated-video-decode
--enable-accelerated-mjpeg-decode
--enable-features=VaapiVideoDecoder,CanvasOopRasterization
--enable-gpu-compositing
--enable-gpu-rasterization
--enable-native-gpu-memory-buffers
--enable-oop-rasterization
--canvas-oop-rasterization
--enable-raw-draw
--use-vulkan