Skip to content

Instantly share code, notes, and snippets.

javascript:(Ext.ComponentManager.each(function(c) {
c = Ext.getCmp(c);
if (c.isContainer && !c.isHeader && !c.isXType('tablepanel') && !c.isXType('headercontainer') && !c.hasCls('x-fieldset-header') && c.items.items.length === 1) {
console.log(c.id + ' only contains 1 child: check for overnesting');
c.rendered && c.el.frame('red');
}
}));
@marcojahn
marcojahn / gist:a63568ce484a0205492b
Created August 20, 2014 12:06
Neo4J profiling 001
neo4j-sh (?)$ profile MATCH (employee:Employee{id:1})
> WITH employee
> MATCH (employee)-[ref_skilllevel:HAS_SKILL]->(skill:Skill)-[ref_skillgroup:BELONGS_TO]->(skillgroup:Skillgroup)
> WITH employee, {skillgroup: skillgroup.skillgroup, skill: collect({skill: skill.skill, level: ref_skilllevel.level})} as skillgroup
> WITH employee, collect(skillgroup) as skillgroup
> MATCH (employee)-[:EXPERT_OF]->(expert:Skill)
> RETURN employee.firstname, skillgroup, collect(expert.skill) as expert;
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| employee.firstname | skillgroup | expert
@marcojahn
marcojahn / gist:391b30ffd359a1abf623
Last active August 29, 2015 14:10
sencha cmd "patch"
// com.sencha.util.http.Server.class
// new, more glue code skipped
private createProxyConfigObject(String path, String host, int port) {
return new ProxyConfigObject(path, host, port);
}
// existing, to be modified
private Server(Responder responder, int port) {
this(port);
/* @author 14islands.com
* SASS mixins for future proof resolution media query
*/
@mixin if-min-resolution($dppx) {
@include if-resolution(min, $dppx) {
@content;
}
}
@marcojahn
marcojahn / secure-secure-shell
Created January 7, 2015 08:25
Secure secure shell
Secure secure shell: https://stribika.github.io/2015/01/04/secure-secure-shell.html
OS X users must update their OpenSSH/OpenSSL system libraries as well. http://www.dctrwatson.com/2013/07/how-to-update-openssh-on-mac-os-x/
A possible configuration for your own server could look like:
Host yourserver
HostName 10.0.0.15
AddressFamily inet
KexAlgorithms curve25519-sha256@libssh.org
HostKeyAlgorithms ssh-ed25519

Pidgin+OTR OSX

update: updated to pidgin 2.10.9.

update: updated to pidgin 2.10.8. Downloaded from source since current brew does not support and there are way too many brew related dependencies to deal with to merge a new formula.

update: if you are using homebrew i submitted brews for all of the components mentioned and you might be able to just brew install pidgin-otr once they are in the mainline branch. I've submitted the additions but you can find the rb's in the meantime here: https://github.com/cyphunk/homebrew

  • OSX 10.7

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
// load underscore from browser console
$.get('https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js');
// execute the following code
function getScopes(root) {
var scopes = [];
function traverse(scope) {
scopes.push(scope);
if (scope.$$nextSibling)
traverse(scope.$$nextSibling);