Skip to content

Instantly share code, notes, and snippets.

View jrencz's full-sized avatar

Jarek Rencz jrencz

  • Wonga
  • Warsaw, Poland
View GitHub Profile
@borekb
borekb / README.md
Last active May 21, 2024 21:41
How to link to headings in GitHub issues and pull requests

How to link to headings in GitHub issues and pull requests

If you have an issue comment / PR description on GitHub, it doesn't automatically get anchors / IDs that you could link to:

Screenshot 2019-07-11 at 13

What I like to do is to add a visible # character like this:

Screenshot 2019-07-11 at 13 42 21

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 2, 2024 13:27
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@Rich-Harris
Rich-Harris / service-workers.md
Last active July 1, 2024 06:33
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
window._eventLog = (function(longTime, important) {
var eventLog = [];
eventLog.getLongEvents = function(time) {
time = time === undefined ? longTime : time;
return this.filter(function(el) {
return el.time > time;
})
}
// Should we filter mousemove?
@staltz
staltz / introrx.md
Last active July 6, 2024 08:47
The introduction to Reactive Programming you've been missing
@rvanbruggen
rvanbruggen / hierarchy.cql for 2.0
Last active June 26, 2022 08:53
A gist to demonstrate the power of Neo4j for dealing with hierarchical data.
//Let's create the top of the tree, the PRODUCT
create (n1:PRODUCT {id:1});
//Let's create 100 children of the PRODUCT, COST_GROUPS connected to the top of the tree
match (n1:PRODUCT {id:1})
with range(1,100) as RANGE, n1
foreach (r in RANGE | create (n2:COST_GROUP {id:r})-[:PART_OF {quantity:round(rand()*100)}]->(n1) );
//for every COST_GROUP, let's connect 100 children at a 3rd level, the COST_TYPEs
match (n2:COST_GROUP)
@technige
technige / zen_of_cypher.md
Last active April 1, 2020 09:57
The Zen of Cypher

The Zen of Cypher

  • Write functions() in lower case, KEYWORDS in upper.
  • START each keyword clause
    ON a new line.
  • Use either camelCase or snake_case for node identifiers but be consistent.
  • Relationship type names should use UPPER_CASE_AND_UNDERSCORES.
  • Label names should use CamelCaseWithInitialCaps.
  • MATCH (clauses)-->(should)-->(always)-->(use)-->(parentheses)-->(around)-->(nodes)
  • Backticks `cân éscape odd-ch@racter$ & keyw0rd$` but should be a code smell.
@mgol
mgol / chrome-angularjs.js
Last active November 22, 2021 15:23
Chrome DevTools Snippet for AngularJS apps.
var ngAppElem = angular.element(document.querySelector('[ng-app]') || document);
window.$injector = ngAppElem.injector();
window.inject = $injector.invoke;
window.$rootScope = ngAppElem.scope();
// getService('auth') will create a variable `auth` assigned to the service `auth`.
var getService = serviceName =>
inject([serviceName, s => window[serviceName] = s]);