Skip to content

Instantly share code, notes, and snippets.

View terrillo's full-sized avatar

Terrillo Walls terrillo

View GitHub Profile
@terrillo
terrillo / Dockerfile
Created November 5, 2021 22:29
wordpress-5.8.1
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true
## Timezone Data
RUN echo "tzdata tzdata/Areas select Europe" > /tmp/preseed.txt; \
echo "tzdata tzdata/Zones/Europe select Berlin" >> /tmp/preseed.txt; \
debconf-set-selections /tmp/preseed.txt && \
apt-get update && \
@terrillo
terrillo / resize-image-and-get-hex-color--resize.py
Last active March 15, 2020 06:16
resize-image-and-get-hex-color--resize
from resizeimage import resizeimage
from PIL import Image
image_path = './dog.jpeg'
new_max_width = 1800
new_filename = './dog-1800.jpeg'
with open(image_path, 'r+b') as f:
with Image.open(f) as image:
# Resize
@terrillo
terrillo / app.js
Last active September 14, 2019 21:47
var TDB = new TelegraphDB("my-project-key", "us-east")
// Access Collection
var users = TDB.collection("users")
// Insert Data
users.insert([{
"info": {
"first_name": "Jack",
"last_name": "Dorsey"
@terrillo
terrillo / server.py
Created May 4, 2017 19:12
Simple Python WebSocket Server
#!/usr/bin/env python
import asyncio
import websockets
async def hello(websocket, path):
name = await websocket.recv()
print(name)
await websocket.send(name)
@terrillo
terrillo / py
Created April 28, 2017 21:32
classifier example
from textblob.classifiers import NaiveBayesClassifier
from textblob import TextBlob
train = [
('what did I miss', 'show-notifications'),
('what happen while I was gone', 'show-notifications'),
('any new events', 'show-notifications'),
('clear all', 'clear-notifications'),
('delete all','clear-notifications')
]
#!/bin/sh
FILES=`git diff --cached --name-only -- '*.php' '*.inc' '*.module'`;
if [ "$FILES" != "" ]
then
echo "Running Code Sniffer..."
command_result=`phpcs --standard=~/bm-core/docroot/sites/ruleset.xml --extensions=php,inc,module --encoding=utf-8 -n -p $FILES`
if [[ $command_result =~ ERROR ]]
then
@terrillo
terrillo / blog.md
Last active January 11, 2017 03:18
Year One Week One

Year One Week One

[image:6E48B749-35FA-4630-AE46-7FA971642DA7-67025-000062C07B0AE2E3/download (1).png]

The Week

Monday 02 January

  • Most check-ins for a month
  • Worst steps for 8 days
  • /Event:/ Drove 10 hours from News Orleans to Tulsa, OK with fiancee. Checkout the wedding page.
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
* {
transform-origin: 20% 80%;
transition: transform 30s linear;
}