Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
juliandescottes / marionette_release_notes.md
Last active May 14, 2024 11:00
Marionette release notes

Quick guide for updating release notes for Marionette on MDN

  1. Check the bugs fixed in release RELEASE: https://bugzilla.mozilla.org/buglist.cgi?j_top=OR&f1=cf_status_firefoxRELEASE&o1=equals&resolution=FIXED&o2=equals&query_format=advanced&f2=cf_status_firefoxRELEASE&v1=fixed&component=Marionette&v2=verified&product=Testing

  2. In this bug list, find the bugs which are relevant for WebDriver users.

  3. If needed, clone the mdn/content repository (https://github.com/mdn/content).

  4. Create a branch for the release, e.g. for Release 91 you might name the branch marionette91.

// Here goes the list of tests from the manifest, with the skip-if etc...
const tests = ``;
// JS and python don't follow the same alphabetical order for special characters
// the safest is to take the output from the linter and add it here.
const expectedOrder = ``.split("\n");
const sortTests = str => {
const lines = str.split("\n");
const tests = [];
@bazhenovc
bazhenovc / the_sane_rendering_manifesto.md
Last active May 14, 2024 10:57
The Sane Rendering Manifesto

The Sane Rendering Manifesto

The goal of this manifesto is to provide an easy to follow and reasonable rules that realtime and video game renderers can follow.

These rules highly prioritize image clarity/stability and pleasant gameplay experience over photorealism and excess graphics fidelity.

Keep in mind that shipping a game has priority over everything else and it is allowed to break the rules of the manifesto when there are no other good options in order to ship the game.

Do not use dynamic resolution.

@PurpShell
PurpShell / monitor.js
Created May 13, 2024 14:48
Monitor Socket messages on 2.3000x and above
if (!window.decodeBackStanza) {
window.decodeBackStanza = require("WAWap").decodeStanza;
window.encodeBackStanza = require("WAWap").encodeStanza;
}
require("WAWap").decodeStanza = async (e, t) => {
const result = await window.decodeBackStanza(e, t);
@CodeShakingSheep
CodeShakingSheep / nextcloud-deck-export-import.py
Last active May 14, 2024 10:55 — forked from svbergerem/nextcloud-deck-export-import.py
Nextcloud Deck Export/Import (Note that all comments will be created from the user account specified in the first lines of the script)
# You need to have the 'requests' module installed, see here: https://pypi.org/project/requests/
import requests
# Note regarding 2FA
# You can either disable 'Enforce 2FA' setting and disable '2FA'. Then you can just use your regular user password.
# Or you can just use an app password, e.g. named 'migration' which you can create in 'Personal settings' --> 'Security'. After successful migration you can delete the app password.
urlFrom = 'https://nextcloud.domainfrom.tld'
authFrom = ('username', 'user password or app password')
urlTo = 'https://nextcloud.domainto.tld'
@ih2502mk
ih2502mk / list.md
Last active May 14, 2024 10:53
Quantopian Lectures Saved
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
[send-sip-response-code]
; Context to send a specific SIP response code and terminate the channel
; Create Custom Destination in FreePBX with a dial string of the format
; send-sip-response-code,404,1
; substitute the appropriate response code in place of the 404
; Reference: https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings
;
; latest version: https://gist.github.com/lgaetz/480582a1827cc98db1ee539c249f074b
;
; License GPL/2
@icasimpan
icasimpan / nginx-centos7.yml
Created October 29, 2017 13:54
Sample ansible playbook to install nginx with sample page on CentOS7
## Credits to John Lieske - https://www.ansible.com/blog/getting-started-writing-your-first-playbook
---
- name: Install nginx
hosts: host.name.ip
become: true
tasks:
- name: Add epel-release repo
yum:
name: epel-release
@wojteklu
wojteklu / clean_code.md
Last active May 14, 2024 10:48
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