Skip to content

Instantly share code, notes, and snippets.


lju veryeasily

Block or report user

Report or block veryeasily

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
from flask import Flask
from textgenrnn import textgenrnn
app = Flask(__name__)
def hello(text):
textgen = textgenrnn()
return textgen.generate(prefix=text,return_as_list=True)[0]
View Flying.jsx
import React from 'react'
export default Flying = (ChildClass) => (
class extends React.Component {
render() {
<div class="flying-css-stuff">
<Flying />
veryeasily / init.js
Last active Sep 14, 2019
Surfingkeys Config
View init.js
// Make F open a single link in a new, inactive tab
map('F', 'C');
map('<Alt-e>', '<Alt-s>');
map('<Alt-F12>', '<Alt-s>');
cmap('<Ctrl-j>', '<Tab>');
cmap('<Ctrl-k>', '<Shift-Tab>');
addSearchAlias('am', 'Amazon', '');
addSearchAlias('lg', 'Library Genesis', '');
addSearchAlias('et', 'Online Etymological Dictionary', '');
veryeasily /
Created Mar 5, 2014
Never modify properties of object pointers on your prototype in javascript, or you break things higher up in the chain. I also show a good workaround
### BAD WAY ###
class Animal = {bar: "baz"}
class Dog extends Animal
fred = new Dog()
cd ${STOREFRONT}/public/images
for i in $(ls); do
pushd .
cd ../..
ack-grep -l "\/public\/images\/$i" > tempfile
cat tempfile
for file in $(< tempfile); do
sed "s/\/public\/images\/${i}/\/images\/${i}/g" "$file" > ${file}.bak
veryeasily / defineGetters.js
Last active Dec 31, 2015
This is a quick write up using underscore to create getters from a JSON object. A good use case is when the object is a response from an endpoint.
View defineGetters.js
function defineGetters (context, obj) {
this.get = {};
// we iterate over the object via underscore creating getter functions
_.each(obj, function (val, ind, list) {
this.get[ind] = function() {
return ( !_.isObject(val) || _.isArray(val) ? val : $.extend({}, val, true) );
}, this);
veryeasily / gist:5640712
Created May 24, 2013
Here is this San Francisco topic search with additional logging to show that the whole object with tons of stuff is returned. Make sure to do CTRL-J to open up the console to see the log (of course)
View gist:5640712
<!DOCTYPE html>
<script src=""></script>
var topic_id = '/en/san_francisco';
var service_url = '';
var params = {};
You can’t perform that action at this time.