Skip to content

Instantly share code, notes, and snippets.

View teddynecsoiu's full-sized avatar

Teddy Necsoiu teddynecsoiu

  • London, UK
View GitHub Profile
@teddynecsoiu
teddynecsoiu / web-servers.md
Created January 18, 2020 10:36 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
def testing_nesting(node)
if node.to_s == "this"
node = "bingo"
end
if node.kind_of?(Array)
node.map! { |item|
testing_nesting(item)
}
@teddynecsoiu
teddynecsoiu / Gatekey.json
Last active June 1, 2018 09:12
Gatekey Profile Structure
{
"user": {
"email": null,
"fullName": null,
"displayName": null,
"hash": null
},
"encryptedData": {
"passwords": [
{

If tmux fails with the message "open terminal failed: missing or unsuitable terminal: rxvt-unicode-256color".

$ ssh remotemachine mkdir -p .terminfo/r
$ scp /usr/share/terminfo/r/rxvt-unicode* remotemachine:.terminfo/r/
@teddynecsoiu
teddynecsoiu / Tint2 config - icon
Last active June 14, 2017 10:06
Tint2 configuration
#-------------------------------------
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Backgrounds
# Background 1: panel
rounded = 0
border_width = 2
border_sides = B
background_color = #000000 100

Openbox prefered apps

Taskbat/toolbar

tint2 + polybar

Lightweight text editor

leafpad / medit

Theming

obconf (for openbox themes)

@teddynecsoiu
teddynecsoiu / package.json
Last active May 11, 2017 09:13
Basic npm package.json for work projects
{
"name": "ss",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"browser": {
"jquery": "./node_modules/jquery/dist/jquery.js"
},
@teddynecsoiu
teddynecsoiu / gulpfile.js
Last active May 17, 2017 14:35
Basic gulpfile configuration for work projects
var gulp = require('gulp');
var gutil = require('gulp-util');
var gulpif = require('gulp-if');
var autoprefixer = require('gulp-autoprefixer');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');
var cleanCSS = require('gulp-clean-css');
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var buffer = require('vinyl-buffer');