Skip to content

Instantly share code, notes, and snippets.

View Thram's full-sized avatar

Thram Thram

  • Self Employed
  • Wellington, New Zealand
View GitHub Profile
@Thram
Thram / css.tsx
Last active September 26, 2020 17:21
Helper to easily Create React Elements using CSS Classes. Useful to work with CSS frameworks and legacy projects.
import React from "react";
export enum HTMLTags {
a = "a",
abbr = "abbr",
address = "address",
area = "area",
article = "article",
aside = "aside",
audio = "audio",
@Thram
Thram / bitrise-android.yml
Created January 29, 2020 00:13 — forked from patw0929/bitrise-android.yml
Bitrise Setting Example
---
format_version: '5'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
workflows:
production:
after_run:
- _base
- _test_node
- _build
@Thram
Thram / .gitlab-ci.yml
Created February 5, 2019 02:45 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@Thram
Thram / letsencrypt_2017.md
Created February 26, 2018 20:06 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@Thram
Thram / js-workshop-2018.md
Last active December 11, 2017 22:48
New workshop structure using CodeSandbox

JavaScript Fundamentals

Lesson 1: Variables, Data types and Assignments

Lesson 2: Arrow functions and Arrays

@Thram
Thram / console.js
Last active June 13, 2017 14:51
Simple HTML console log
const $console = document.createElement('div');
$console.setAttribute('class', 'console');
let $lines = [];
const createLine = type => (message, o = {}) => {
const $line = o.line ? $lines[o.line] : document.createElement('div');
$line.setAttribute('class', type + (o.bg ? ' background' : ''));
const text = typeof o.data === 'undefined'
? message
@Thram
Thram / console.css
Last active June 15, 2017 12:29
Simple style for a HTML console log
@import url('https://fonts.googleapis.com/css?family=Inconsolata');
.console {
font-family: 'Inconsolata', monospace;
border-radius: .5rem;
background: #1D1F20;
padding: .5rem;
margin: 1rem;
white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* Firefox */
@Thram
Thram / js-workshop-2017.css
Last active December 11, 2017 03:35
Stylesheet and Tools for JS Workshop (2017)
@import "https://fonts.googleapis.com/css?family=Bangers";
*, *:after, *:before {
box-sizing: border-box;
transition: all .4s ease;
}
html, body {
font-family: Bangers, serif;
width: 100%;
@Thram
Thram / vanilla-js-cheatsheet.md
Created May 9, 2017 03:41 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet

Use npm-check-updates and npm shrinkwrap

For the curious who make it this far, here is what I recommend:

###Use npm-check-updates or npm outdated to suggest the latest versions.

$ npm outdated
     # or
$ npm install -g npm-check-updates
$ npm-check-updates

update package.json with new versions if you agree