Skip to content

Instantly share code, notes, and snippets.

View pocmo's full-sized avatar
🚀
Just passing by.

Sebastian Kaspari pocmo

🚀
Just passing by.
View GitHub Profile
@pocmo
pocmo / HSK1.md
Last active July 10, 2018 10:24
HSK-1 List - Traditional chinese
  • 的 de5 de indicates possession, like adding 's to a noun
  • 我 wo3 wǒ I; me
  • 你 ni3 nǐ you (singular)
  • 是 shi4 shì be; is; are; am
  • 了 le5 le indicates a completed or finished action
  • 不 bu4 bù no; not
  • 在 zai4 zài at; on; in; indicates an action in progress
  • 他 ta1 tā he; him
  • 我們 wo3men5 wǒmen we; us
  • 好 hao3 hǎo good
Some ideas include:
* Search plugins: Focus re-used a lot of Fennec code here and this code + search plugins is something that is annoying to keep
updated and bug free over multiple code bases.
* Autocomplete domains: We want to update the list and it is duplicated over all our code bases. Including the code to load
and autocomplete from those lists.
* InlineAutocompleteEditText: Focus copied and modified the version from Fennec. When we started working on Focus I couldn't
alias hgclean='hg status | grep '\''^\?'\'' | sed '\''s/^\? //'\'' | xargs rm -rf'
@pocmo
pocmo / api-scribble.kt
Last active October 26, 2017 16:14
Experiments - Kotlin - Scribble
// In this scribble the experiments (A/B) library is called "Fretboard"
// Experiments.* are not part of the library but constants in the actual app project
///////////////////////////////////////////////////////////////////////////
// Simple API (Java style):
///////////////////////////////////////////////////////////////////////////
if (Fretboard.isInEperiment(Experiments.BOOKMARKS)) {
// do something
# Linux:
adb shell screencap -p | sed 's/\r$//' > screen.png
# OS X:
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
# See all local images
docker images
# Start bash in image
docker run -it <image> /bin/bash
# Show all containers
docker ps -a
# Join container
##############################################################
# Build Firefox for Android ##################################
##############################################################
ac_add_options --enable-application=mobile/android
mk_add_options MOZ_OBJDIR=./objdir-frontend
# Artifact builds (Fox yeah!)
ac_add_options --enable-artifact-builds

Questions

  • Can a language pack be a single file?

Catalog example entry

{
  last_modified:	1476698557996
  schema:	        1476697392908
  id:           	"9cc46c00-ac25-4e6f-8280-6711cad2efe6"
 type: "asset-archive"
@pocmo
pocmo / count.js
Last active April 25, 2017 09:54
Count open/closed/total tasks for list of visible GitHub issues
(function() {
let open = total = done = 0;
let collection = document.getElementsByClassName('task-progress-counts');
for (let i = 0; i < collection.length; i++) {
let counts = collection[i].innerHTML.split(" of ").map((x) => parseInt(x));
total += counts[1]; done += counts[0]; open += counts[1] - counts[0];
}
alert("Total: " + total + "\nOpen: " + open + "\nDone: " + done);
})();
##############################################################
# Build Firefox for Android ##################################
##############################################################
ac_add_options --enable-application=mobile/android
mk_add_options MOZ_OBJDIR=./objdir-frontend
# Artifact builds (Fox yeah!)
ac_add_options --enable-artifact-builds