Skip to content

Instantly share code, notes, and snippets.

View remoharsono's full-sized avatar

Remo Harsono remoharsono

View GitHub Profile
@joepie91
joepie91 / express-server-side-rendering.md
Last active February 20, 2024 20:52
Rendering pages server-side with Express (and Pug)

Terminology

  • View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
  • View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
  • HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
  • String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active January 6, 2024 22:04
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@leonardofed
leonardofed / README.md
Last active April 29, 2024 10:49
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@blagoeres
blagoeres / .md
Last active March 3, 2019 05:31
⭐ Frontend tooling & development environment for OS X

Setup your development environment for OS X

I bought new Macbook Pro 15 Retina. These are tools I like to install on macOS operating system.

Checklist

Prep OS X

  • Download and install latest version of Xcode from the Mac App Store.
  • Download and install Apple's Command Line Tools by issuing this command xcode-select --install
@robinrendle
robinrendle / browsersync-webpack.md
Last active February 27, 2024 12:04
Getting set up with Browsersync and Webpack

Fixing our local environment with Browsersync

Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server and BrowserSync we can fix this:

npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server

BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.

@remoharsono
remoharsono / shape2mysql
Created May 4, 2016 17:46 — forked from rugbyprof/shape2mysql
Add shapefile to MySQL
ogr2ogr -f MySQL MySQL:DATABASENAME,host=localhost,user=USER,password=PASSWORD SHAPEFILE.shp -nln TABLENAME -update -overwrite -lco engine=MYISAM
@subfuzion
subfuzion / curl.md
Last active May 1, 2024 18:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@cpbotha
cpbotha / pyside_dynamic.py
Last active January 17, 2024 05:39
pyside_dynamic.py with minor improvements - also see http://stackoverflow.com/a/14894550/532513
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# Copyright (c) 2011 Sebastian Wiesner <lunaryorn@gmail.com>
# Modifications by Charl Botha <cpbotha@vxlabs.com>
# * customWidgets support (registerCustomWidget() causes segfault in
# pyside 1.1.2 on Ubuntu 12.04 x86_64)
# * workingDirectory support in loadUi
# found this here:
# https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 1, 2024 17:49
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang