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.
$ python -m SimpleHTTPServer 8000
# current code. BAD. | |
import uuid | |
from uuid import UUID | |
from typing import cast | |
from dataclasses import dataclass | |
@dataclass | |
class DC: | |
uuid: UUID |
# REF: https://platform.openai.com/docs/guides/rate-limits/overview | |
class RateLimiter < ApplicationRecord | |
include Tracing | |
USAGE = -> do | |
# a multi-process, mutli-thread, multi-machine (assuming shared db), safe rate limiter | |
# instance level interface | |
rl = RateLimiter.for(:some, :api, maximum: 1, window: 3) |
s = """Gur Mra bs Clguba, ol Gvz Crgref | |
Ornhgvshy vf orggre guna htyl. | |
Rkcyvpvg vf orggre guna vzcyvpvg. | |
Fvzcyr vf orggre guna pbzcyrk. | |
Syng vf orggre guna arfgrq. | |
Fcnefr vf orggre guna qrafr. | |
Ernqnovyvgl pbhagf. | |
Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf. | |
Nygubhtu cenpgvpnyvgl orngf chevgl. |
# fixes "# mesg: ttyname failed: Inappropriate ioctl for device" warnings when building docker | |
# | |
echo '#! /bin/sh' > /usr/bin/mesg | |
chmod 755 /usr/bin/mesg | |
# all this does is replace the 'mesg' command with a no-op that always succeeds. | |
# do this *early* in your Dockerfile somewhere. | |
# from a security persprective this is also fine because it relates to multi-user unix systems, | |
# not single user/contrained docker images. |
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.
$ python -m SimpleHTTPServer 8000
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.
$ python -m SimpleHTTPServer 8000
class A | |
attr_accessor :dsl | |
attr_accessor :state | |
def initialize | |
@state = [] | |
@dsl = self.class.dsl | |
sleep(rand) |
#! /usr/bin/env ruby | |
require_relative '../lib/script.rb' | |
script { | |
help ' | |
HELP! | |
' | |
run { |
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
// | |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
import firebase from 'firebase' | |
Vue.config.productionTip = false |
# | |
require 'open-uri' | |
require 'json' | |
# | |
module TargetSmartStateDictionary | |
def TargetSmartStateDictionary.url | |
@url ||= ( | |
'https://gist.githubusercontent.com/mshafrir/2646763/raw/8b0dbb93521f5d6889502305335104218454c2bf/states_hash.json' | |
) |