Skip to content

Instantly share code, notes, and snippets.

Falko select

  • Webpgr
  • Berlin
Block or report user

Report or block select

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
View OpenWRT on TP-Link TL-WR1043N-ND v1.md
@select
select / objectsToCsv.js
Last active Nov 12, 2018
Convert an Array of non uniform Objects to a CSV string with JavaScript
View objectsToCsv.js
function getKeys(obj, prefix = '') {
if (typeof obj === 'undefined' || obj === null) return [];
return [
...Object.keys(obj).map(key => `${prefix}${key}`),
...Object.entries(obj).reduce((acc, [key, value]) => {
if (typeof value === 'object') return [...acc, ...getKeys(value, `${prefix}${key}.`)];
return acc;
}, []),
];
}
@select
select / cyan-light.tmuxtheme
Last active Dec 17, 2017
Tmux theme: cynan white background
View cyan-light.tmuxtheme
# Powerline Cyan Light - Tmux Theme
# github @select
# based on
# Powerline Cyan - Tmux Theme
# Created by Jim Myhrberg <contact@jimeh.me>.
#
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
#
# Requires terminal to be using a powerline compatible font, find one here:
# https://github.com/Lokaltog/powerline-fonts
View css slide menu
ul {
list-style: none;
position: relative;
padding: 0;
margin: 0;
box-sizing: border-box;
}
ul li {
position: relative;
View social-link-generator.html
@select
select / box.js
Last active Nov 9, 2016
Express Mongo REST API in ES6 with co and generators mongoose and lodash
View box.js
'use strict';
let router = require('express').Router();
const co = require('co');
const mongoose = require('mongoose');
const Box = mongoose.model('Box');
const _ = require('lodash');
// ---
router.route('/')
@select
select / Default (Linux).sublime-keymap
Created Feb 6, 2015
Sublime Text replace selected text with a snippet, trigger this with a keyboard shortcut (e.g. for wrapping natural laguage strings with a call to a translation function)
View Default (Linux).sublime-keymap
// add this to your "Key Bindings - User" to trigger the snipped
{
"keys": ["ctrl+1"],
"command": "insert_snippet",
"args": {
"name": "Packages/User/php-translation-wrap-string.sublime-snippet"
},
}
@select
select / tumblr_oauth.py
Last active Dec 9, 2015
Tumblr OAuth for web2py
View tumblr_oauth.py
from gluon.contrib.login_methods.oauth10a_account import OAuthAccount
import pytumblr
class TumblrOAuth(OAuthAccount):
"""OAuth for Tumblr"""
# Define oauth application id and secret.
consumer_key = 'XXX'
consumer_secret = 'XXX'
You can’t perform that action at this time.