Skip to content

Instantly share code, notes, and snippets.

@joakin
joakin / _what.md
Last active January 29, 2020 13:36
phabricator stylish
@joakin
joakin / ItemImages.php
Created March 25, 2015 17:16
fetching page images mw
<?php
namespace Gather\stores;
use \PageImages;
use Title;
/**
* Loading page images for titles
*/
@joakin
joakin / git-find-me-the-fucking-deleted-file.sh
Last active March 12, 2025 06:31
finding a deleted file in a git repository
# If you don't remember the exact path/name, search the log for deleted files
git log --diff-filter=D --summary | grep delete
# Find the file you want to get from the ouput, and use the path
# Find the commits that involved that path
git log --all -- some/path/to/deleted.file
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted)
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file
@joakin
joakin / faces.json
Created March 26, 2015 11:21
ascii art (faces and stuff)
[
{
"txt": "Table Flip",
"val": "(╯°□°)╯︵ ┻━┻"
},
{
"txt": "umadbro?",
"val": "¯\\_(ツ)_/¯"
},
{
@joakin
joakin / changelog.md
Last active October 7, 2015 23:58
Awesome changelogs

Generate cool changelogs (adapted for mediawiki extension):

Markdown version:

git log --since=1.week --pretty=format:'%s ([Gerrit](https://gerrit.wikimedia.org/r/#/q/%h,n,z) ∙ [Github](https://github.com/wikimedia/mediawiki-extensions-Gather/commit/%h))' --reverse | grep -v '^.\{7\} Merge\|Localisation'

Html version (example):

git log --since=1.week --pretty=format:'%s (<a href="https://gerrit.wikimedia.org/r/#/q/%h,n,z">Gerrit</a> ∙ <a href="https://github.com/wikimedia/mediawiki-extensions-Gather/commit/%h">Github</a>)' --reverse | grep -v '^.\{7\} Merge\|Localisation'

@joakin
joakin / cloc.txt
Created May 5, 2015 10:14
mediawiki cloc report
mediawiki (master %=) $ cloc --exclude-dir=vendor,node_modules,tools .
13558 text files.
12729 unique files.
1707 files ignored.
http://cloc.sourceforge.net v 1.62 T=120.17 s (97.4 files/s, 20750.7 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
JSON 4822 124 0 841161
@joakin
joakin / tests.sh
Created May 14, 2015 09:48
selenium results
browser (review/jdlrobson/qa23 $) $ KEEP_BROWSER_OPEN=true BROWSER=firefox bundle exec cucumber features/new_collection.feature
@chrome @en.m.wikipedia.beta.wmflabs.org
Feature: Creating new collections
Background: # features/new_collection.feature:4
Given I am logged into the mobile website # features/step_definitions/common_steps.rb:15
And I am using the mobile site # features/step_definitions/common_steps.rb:1
And I am in alpha mode # features/step_definitions/common_steps.rb:20
And I am on the "Selenium Gather test" page # features/step_definitions/common_steps.rb:33
When I click the watchstar # features/step_definitions/common_steps.rb:39
@joakin
joakin / _.md
Created June 11, 2015 14:44
Vagrant - mysql not running but ...

It's not connecting to mysql but i've ssh'd in and run mysql and the server is running and I can execute queries just fine... :(

@joakin
joakin / remoties-notes.md
Created June 16, 2015 07:43
We're all remoties notes
  • Seeing a lot of faces/facial expressions is very useful
  • A/V meetings are faster than audio-only conf calls
  • Proper office space and separation helps
  • Use calendar for meeting. Block your busy times.
  • Default to muted if there's unexpected sounds around (kids, pets, etc)
  • Meetings
    • Aggressively limit them
      • 18people 14cities nonadjacent timezones with only 3 meetings (30m) a week everybody was up to date, finished by mid day ¿tuesday?
  • How: