Skip to content

Instantly share code, notes, and snippets.

@funzoneq
funzoneq / simplehttp.service
Created May 25, 2016 13:24
A systemd file for a python SimpleHTTPServer
View simplehttp.service
[Unit]
Description=Job that runs the python SimpleHTTPServer daemon
Documentation=man:SimpleHTTPServer(1)
[Service]
Type=simple
WorkingDirectory=/tmp/letsencrypt
ExecStart=/usr/bin/python -m SimpleHTTPServer 80 &
ExecStop=/bin/kill `/bin/ps aux | /bin/grep SimpleHTTPServer | /bin/grep -v grep | /usr/bin/awk '{ print $2 }'`
@bishboria
bishboria / springer-free-maths-books.md
Last active January 22, 2023 04:47
Springer made a bunch of books available for free, these were the direct links
@WebReflection
WebReflection / uce-vs-lit-element.md
Last active January 6, 2023 11:41
A very simple comparison table between uce and lit-element.
View uce-vs-lit-element.md

uce vs lit-element

A very simple comparison table between these two libraries.

uce lit-element
version 1.11.9 2.4.0
license ISC (simplified MIT) BSD-3-Clause License
language JS w/ TS definition TS w/ JS transpilation
size ( brotli ) 9437b ES5 / 6811b ES2015+ 8634b ES5 / 6708b ES2015+
@noelrappin
noelrappin / splat_check.rb
Created December 30, 2022 18:00
Splat check
View splat_check.rb
class Consumer
def takes_args(a, b, c)
p "#{a} #{b} #{c}"
end
def takes_keys(a:, b:, c:)
p "#{a} #{b} #{c}"
end
end
@terrancesnyder
terrancesnyder / setenv.sh
Created May 23, 2011 00:07
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
View setenv.sh
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@strzibny
strzibny / unused_routes.rb
Created May 5, 2016 15:21
Find unused routes in Rails
View unused_routes.rb
#!/usr/bin/env ruby
# Extracted from traceroute gem + checking the presence of views as well
require_relative './config/environment.rb'
class Traceroute
def initialize(app)
@app = app
end
@thaJeztah
thaJeztah / index.md
Last active December 4, 2022 00:41
Ubuntu or Alpine? A quick comparison
View index.md

Ubuntu ... or Alpine? A quick comparison

Let's see how they compare with a minimal example: run an image that installs curl and pulls the Holberton homepage

Ubuntu

Pull the ubuntu:16.04 image

View hiring_backend_developer.md

Senior Backend Developer at Devengo

Devengo is a startup focused on a simple but ambitious mission: make finance a fairer place. Founded by well-known fintech players Fernando Cabello-Astolfi and Alberto Molpeceres our first product is an innovative social benefit that allows workers to collect their earned wages in real-time. Your money, when you need it.

The problem

Economists identify¹ three main challenges any person and household must face to reach a sustainable level of financial wellness: having sufficient and stable income, maintaining an economic-financial balance that limits problems of overindebtedness and avoiding severe poverty.

The last two challenges are the most pressing ones as they have an immediate effect on the material living conditions of the population and they compound over time sinking the households' economies further and further.

In Spain al

View websocket_bencmark.md

Crystal vs Node.js Websocket Benchmark

Crystal 0.9.1 with Kemal

require "kemal"

ws "/" do |socket|
  socket.on_message do |message|
 end
@jrichardsz
jrichardsz / sheet-to-api-rest-v1.js
Last active January 31, 2022 01:42
google sheet spreadsheet as api rest using google app script or feeds
View sheet-to-api-rest-v1.js
var sheetId = "15x3asddawIXE";
var sheetName = "20adsasd-4";
var token = 'adasdasd';
var telegramToken = 'asdasdasd';
var book = SpreadsheetApp.openById(sheetId);
var sheet = book.getSheetByName(sheetName);
var sheetLog = book.getSheetByName("log");