Skip to content

Instantly share code, notes, and snippets.

View Timtech4u's full-sized avatar
🎯
Focusing

Timothy Olaleke Timtech4u

🎯
Focusing
View GitHub Profile
@Timtech4u
Timtech4u / cloudbuild.yaml
Created May 26, 2019 00:05
Continuous Deployment on Google Cloud Run
steps:
# build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/projectz-239507/app', '.']
# push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/projectz-239507/app']
# Deploy container image to Cloud Run
- name: 'gcr.io/cloud-builders/gcloud'
args: ['beta', 'run', 'deploy', 'app', '--image', 'gcr.io/projectz-239507/app', '--region', 'us-central1']
@Timtech4u
Timtech4u / Dockerfile
Last active July 9, 2019 13:10
Source Codes for Google Cloud Run Article
# Use the official Node.js 10 image.
# https://hub.docker.com/_/node
FROM node:10
# Create and change to the app directory.
WORKDIR /usr/src/app
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm install on every code change.
@Timtech4u
Timtech4u / kano-part.json
Created March 19, 2019 08:58
kano-part-poly
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Timtech4u
Timtech4u / countries.geojson
Last active August 21, 2023 09:11
Feature Collection of Countries
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Timtech4u
Timtech4u / kano.geojson
Last active March 14, 2019 15:55
Kano's GeoJSON Feature Point
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Timtech4u
Timtech4u / contact.html
Created March 9, 2019 23:58
Contact Page for Personal Website
---
layout: default
---
<div class="typeform-widget" data-url="https://timothyolaleke.typeform.com/to/SG6ad8" style="width: 100%; height: 500px;"></div> <script> (function() { var qs,js,q,s,d=document, gi=d.getElementById, ce=d.createElement, gt=d.getElementsByTagName, id="typef_orm", b="https://embed.typeform.com/"; if(!gi.call(d,id)) { js=ce.call(d,"script"); js.id=id; js.src=b+"embed.js"; q=gt.call(d,"script")[0]; q.parentNode.insertBefore(js,q) } })() </script>
@Timtech4u
Timtech4u / _config.yaml
Created March 9, 2019 22:40
My Github Personal Website Configuration
layout: stacked
style: dark
plugins:
- jekyll-octicons
- jekyll-github-metadata
- jemoji
permalink: /:year/:month/:day/:title/
@Timtech4u
Timtech4u / dps.jinja
Last active July 29, 2020 13:21
Firewall and a Startup Script with Deployment Manager
imports:
- path: install-web.sh
name: install-web.sh
resources:
- name: default-allow-http
type: compute.v1.firewall
properties:
sourceRanges: ["0.0.0.0/0"]
targetTags: ["http-server"]
allowed:
command usage
git init Creates an empty Git repository in the specified directory.
git clone <repository name> Clones a repository located at <repository name> onto your local machine.
git add <directory> Stages only the specified changes for the next commit. Replace <directory> with a <file> to change a specific file.
git add . Stages new files and modifications without deletions
git add -A Stages all changes
git add -all Equivalent to git add -A
git add -u Stages modifications and deletions without adding new files
git add --update Equivalent to git add -u
git commit -m ”<message>” Commits the staged snapshot. replace <message> with the commit message.
@Timtech4u
Timtech4u / Renamer.py
Created February 12, 2019 15:03
A simple script to rename .pdf files based off a CSV lookup file (containing the name for their codes)
import os, csv
# Define paths and variables to be used
currentPath = os.getcwd()
csvFieName = 'LookUpTable.csv'
csvFilePath = os.path.join(currentPath, csvFieName)
locationInfo = {}
# Read locations into locationInfo with locationCode => locationName
with open(csvFilePath) as csvFile: