Skip to content

Instantly share code, notes, and snippets.

View jpteti's full-sized avatar

J-P Teti jpteti

View GitHub Profile
@jpteti
jpteti / wisdom.md
Created December 10, 2021 18:39 — forked from merlinmann/wisdom.md
The Wisdom Project (Draft)

The Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

(Link to this page)

var currentText = editor.getSelectedText();
function processText(unclappedString) {
var splitString = unclappedString.split(' ');
var newStringParts = [];
for (i = 0; i < splitString.length; i++) {
var subString = splitString[i];
newStringParts.push(subString);
newStringParts.push("👏");
This software is licensed under the "Anyone But Richard M Stallman"
(ABRMS) license, described below. No other licenses may apply.
--------------------------------------------
The "Anyone But Richard M Stallman" license
--------------------------------------------
Do anything you want with this program, with the exceptions listed
below under "EXCEPTIONS".

Keybase proof

I hereby claim:

  • I am jpteti on github.
  • I am jpteti (https://keybase.io/jpteti) on keybase.
  • I have a public key ASABPGpKM69FmoOnWR6mCceeky3i3R7NcQvl8WJPS3W4xAo

To claim this, I am signing this object:

require 'rubygems'
require 'statistics2'
require 'active_support'
require 'active_support/core_ext'
require 'pollster'
require 'csv_shaper'
# How many trials?
trials = 250000
poll_count = 0
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@jpteti
jpteti / chat.rb
Created December 27, 2013 16:22 — forked from rkh/chat.rb
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
RUN_CLANG_STATIC_ANALYZER = YES
CC = /Volumes/Space/Users/bungi/Source/LLVM/llvm/Release/bin/clang

This is a heading

Let's just see if this works. I bet it doesn't work at all. Markdown was invented by John Gruber, who writes the blog Daring Fireball.

@jpteti
jpteti / Bcrypt.php
Created June 29, 2011 14:52
Simple PHP 5.3+ Bcrypt class adapted from phpass
<?php
/*
Adaptation by Marco Arment <me@marco.org>.
Adapted from Portable PHP Password Hashing Framework (phpass) version 0.3:
http://www.openwall.com/phpass/
phpass was by Solar Designer <solar at openwall.com> in 2004-2006 and is in
the public domain. This adaptation is also in the public domain.