Skip to content

Instantly share code, notes, and snippets.

View davidpelaez's full-sized avatar

David Pelaez davidpelaez

  • Vlipco
  • Bogota, Colombia
View GitHub Profile
@adtac
adtac / Dockerfile
Last active November 1, 2024 03:05
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@sleepyfox
sleepyfox / 2019-07-25-users-hate-change.md
Last active September 13, 2024 08:39
'Users hate change'

'Users hate change'

This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

#!/usr/bin/env bash
set -e
if [ -e static ]; then
rm -r static
fi
mkdir -p static
sass src/sass/main.scss > static/application.css
$(npm bin)/browserify src/js/main.js > static/application.js
@mrizvic
mrizvic / auth.py
Last active June 15, 2024 11:11
Static password and OTP authentication for OpenVPN in with custom python scripts
#!/usr/bin/env python3
import os
import sys
import datetime
import pyotp
import hashlib
### TO ALLOW ACCSSS CALL sys.exit(0)
### TO DENY ACCESS CALL sys.exit(1)
@torgeir
torgeir / installing-ubuntu-snappy-core-on-the-raspberry-pi-2-from-os-x.md
Last active July 27, 2018 07:47
Installing ubuntu snappy core on the raspberry pi 2 from os x

Git Cheat Sheet

Commands

Getting Started

git init

or

.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js
@jodosha
jodosha / lotus-sinatra.gemspec
Last active January 4, 2016 19:09
Building Sinatra with Lotus
Gem::Specification.new do |s|
s.name = 'lotus-sinatra'
s.version = '0.1.0'
s.platform = Gem::Platform::RUBY
s.author = 'Luca Guidi'
s.email = '[email protected]'
s.summary = 'Building Sinatra with Lotus'
s.description = 'A step by step guide about how use Lotus to build Sinatra'
s.homepage = 'http://bit.ly/1e4e58T'
s.license = 'MIT'