Skip to content

Instantly share code, notes, and snippets.

View goldingdamien's full-sized avatar

Damien Golding goldingdamien

View GitHub Profile
@jazeabby
jazeabby / laravellocal.md
Created January 11, 2019 19:55 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@wiseoldman
wiseoldman / _letter-spacing.scss
Last active August 27, 2021 12:13
[Adobe XD letter-spacing] SCSS mixin to convert letter-spacing from Adobe XD to CSS #xd #letter-spacing
@mixin letter-spacing($spacing) {
letter-spacing: ($spacing / 1000) * 1em;
}
@sethbergman
sethbergman / install-docker.sh
Last active December 27, 2021 16:38 — forked from dweldon/install-docker.sh
Install Docker CE on Linux Mint 19
#!/usr/bin/env bash
set -e
# https://docs.docker.com/engine/install/ubuntu/
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 2>/dev/null
sudo echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') bionic stable" > /etc/apt/sources.list.d/docker.list
sudo apt-get -y update
@gaearon
gaearon / index.html
Last active February 13, 2024 09:46
Multiple React components on a single HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@LeCoupa
LeCoupa / vue_js_cheatsheet.js
Last active October 23, 2023 10:38
Vue js Cheatsheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* GLOBAL CONFIG
* Vue.config is an object containing Vue’s global configurations.
* You can modify its properties listed below before bootstrapping your application.
* https://vuejs.org/v2/api/#Global-Config
* ******************************************************************************************* */
// Configure whether to allow vue-devtools inspection
Vue.config.devtools = true
const puppeteer = require('puppeteer');
class Webpage {
static async generatePDF(url) {
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode.
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required.
const pdfConfig = {
path: 'url.pdf', // Saves pdf to disk.
format: 'A4',
@shospodarets
shospodarets / Chrome headless Puppeteer- capture DOM element screenshot using
Last active January 17, 2023 18:52
Chrome headless Puppeteer- capture DOM element screenshot using
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'});
@manabuyasuda
manabuyasuda / Noto-Sans-Jp.md
Last active May 26, 2024 06:26
Noto Sans JPを使うための手順。

Noto Sans JP

Noto Sans JPをWebサイトで使う場合、大きく分けて2つの方法があります。

  1. CDNを使う場合
  2. サーバーにフォントファイルを置く場合

CDNの場合は、他のサイトを含めて一度でも読み込まれていればブラウザ側でキャッシュを持っているので、読み込み速度が速くなることが期待できます。
サーバーのフォントファイルはサブセット化(不要なデータを削除すること)でファイルサイズを削減できるメリットがあります。

基本的にはCDNを利用して、フォールバックとしてサーバーに置いたフォントファイルとシステムフォントを指定するのがいいでしょう。

@mommaroodles
mommaroodles / .htaccess-mod_headers
Created July 4, 2017 22:57 — forked from hans2103/.htaccess-mod_headers
.htaccess rules to set cache control.
<IfModule mod_headers.c>
Header set Connection keep-alive
# Cache-control headers
# 2 HOURS
#<filesMatch "*">
Header set Cache-Control "max-age=7200, must-revalidate"
#</filesMatch>
# 480 weeks - 290304000