Skip to content

Instantly share code, notes, and snippets.

@pkrawc
pkrawc / Agent List
Created April 27, 2020 14:15
This is not a complete dict, just what I was able to scrape from this site: https://deviceatlas.com/blog/list-of-user-agent-strings
[
{
"agent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36",
"device": "Samsung Galaxy S9"
},
{
"agent": "Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Mobile Safari/537.36",
"device": "Samsung Galaxy S8"
},
{
@pkrawc
pkrawc / lesson-1.md
Created July 23, 2019 15:40
Lesson One of UI Development

Lesson 1

Basic HTML elements

What Is HTML

It stands for Hyper Text Markup Language and it's what the web is founded on. Created by Tim Berners Lee at Cern in the 90s it is a structured way of writing things so that machines can read them as easily as humans. You've probably seen the syntaxt before and it becomes pretty easy to read if you know what to look for.

First Things First, The URL

Urls are kind of magic. They are the blood of the internet, without links and ways of sharing we would not have a community online. Urls have two basic structures.A url can be absolute: https://facebook.com, or relative: /blog/my-first-blog-post. Absolute URLS are what most people think of when they hear URL, but relative paths make up much of your life without you knowing it. Think of relative URLs like a file path. In Finder, you have your home folder (usually named your name so mine is patrick). Inside that you have a Desktop folder and on your desktop you have a screenshot.png file. The relative

@pkrawc
pkrawc / 1.9.3_config.log
Created October 7, 2017 04:06
1.9.3 Config
configure: WARNING: you should use --build, --host, --target
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin17.0.0
checking host system type... x86_64-apple-darwin17.0.0
checking target system type... x86_64-apple-darwin17.0.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
@pkrawc
pkrawc / 1.9.3_make.log
Created October 7, 2017 03:59
Make Log Error for 1.9.3
+__rvm_make:0> make -j4
CC = gcc-4.9
LD = ld
LDSHARED = gcc-4.9 -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin17.0.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/patrick/.rvm/rubies/ruby-1.9.3-p194/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c
@pkrawc
pkrawc / law_depot.md
Last active September 25, 2017 21:33
Law Depot Teardown

Law Depot

Law Depot helps lanldords generate lease agreements they can then download and print. The documents are not templates but filled out pdf forms. A landlord would typically create a lease form in one sitting and probably never interact with the site again. I imagine the number of landlords the site converts to paying subscriptions is low. A landlord comes to this page with the purpose of creating a lease for their newly found tenants to sign.

IA

Imgur

The Good

Lessors

😄

@pkrawc
pkrawc / .osx
Last active May 16, 2017 17:12
Steps For Setting Ip a Design-y Development Environment on MacOs Sierra
sudo -v
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Remove the sleep image file to save disk space
sudo rm /private/var/vm/sleepimage
# Create a zero-byte file instead…
sudo touch /private/var/vm/sleepimage
# …and make sure it can’t be rewritten
@pkrawc
pkrawc / dec-react-record.md
Last active May 9, 2017 00:38
Declarative Reactive Record Thoughts

Reaction Record

A declarative resource manager for react

A declaritive programming approach describes the logic of the program without describing its control flow. Its a WHAT not HOW approach.

Basic Usage

import Record from 'reaction-record'

OMG WEBPACK, ES6, EVERYTHING, IN ONE SMALL BUNDLE , SUCH WOW

Think of /frontend as the precompiled app. We're not going to use rails to compile anything really. Hopefull we can fit everything we need into this one folder on production (we'll see). Anyway, so the /frontend uses gulp and webpack to compile everything down into a bundle.min.js in app/assets/javascripts.

To get up and running here are the steps.

  1. git clone https://whatever.git
  2. bundle install
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
PATH=/usr/local/bin:/usr/local/mysql/bin:$PATH
PATH=/usr/local/bin:$PATH
PATH=$HOME/bin:$PATH
export PATH
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do