Skip to content

Instantly share code, notes, and snippets.

Avatar
⏲️
Why is there never enough time?

Felix Kling fkling

⏲️
Why is there never enough time?
View GitHub Profile
View yarn.lock.patch
diff --git a/website/yarn.lock b/website/yarn.lock
index b5a3850..44f5321 100644
--- a/website/yarn.lock
+++ b/website/yarn.lock
@@ -122,6 +122,10 @@ ansi-escapes@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
+ansi-escapes@^2.0.0:
+ version "2.0.0"
View jsxelement_extension.js
function getAttributes(filter) {
var nodes = [];
this.forEach(path => {
nodes.push(...path.get('openingElement', 'attributes'));
});
if (filter) {
return jscodeshift(nodes).filter(path => jscodeshift.match(path.node, filter));
}
return jscodeshift(nodes);
}
View keybase.md

Keybase proof

I hereby claim:

  • I am fkling on github.
  • I am fkling (https://keybase.io/fkling) on keybase.
  • I have a public key whose fingerprint is A38D 5440 C2E2 17FB CAFB EBD4 AB3B C3BF 00AC 6000

To claim this, I am signing this object:

@fkling
fkling / App.js
Last active Feb 1, 2018
Bootstrap files for React + JSX with browserify and gulp.js
View App.js
"use strict";
// Use
// var React = require('./react');
// instead if you are loading React externally, via a <script> element
var React = require('react');
var App = React.createClass({
render: function() {
return <h3>Hello World!</h3>;
@fkling
fkling / error.log
Created Jul 1, 2014
recast + jest-cli errors
View error.log
fkling@Felixs-iMac ~/D/p/es6-forof> jest
Using Jest CLI v0.1.16
Found 1 matching tests...
FAIL __tests__/es6forof-test.js (0.166s)
Before parse
After parse
Before print
● es6-forof transform › it handles source
- Throws: AssertionError: false == true
1 tests failed, 0 tests passed (1 total)
@fkling
fkling / gist:6213239
Created Aug 12, 2013
Closuer compiler enum example.
View gist:6213239
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @output_file_name default.js
// ==/ClosureCompiler==
/**
* @enum {number}
*/
MyNamespace.MyEnum = {
FOO: 1,
View Server response
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>GlassFish Server Open Source Edition 3.0.1 - Error report</title><style type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></p><p><b>description</b>The server encountered an internal error () that prevented it from fulfilling this request.</p><p><b>excepti
View gist:367660
<?php
class sfValidatorDoctrineUnique extends sfValidatorSchema {
//...
protected function doClean($values)
{
//...
$table = Doctrine::getTable($this->getOption('model'));
//...
$q = Doctrine_Query::create()
->from($this->getOption('model') . ' a');
View symfony_password_validator.php
<?php
class fkValidatorPassword extends sfValidatorBase {
/**
* Configures the current validator.
*
* Available options:
*
* password: The password that is already set (required)
* pattern: A regex pattern or an array of regex patterns compatible with PCRE