Skip to content

Instantly share code, notes, and snippets.

View manuelbieh's full-sized avatar
⚛️
Available for hire! Berlin. React.

Manuel Bieh manuelbieh

⚛️
Available for hire! Berlin. React.
View GitHub Profile
@philipp-spiess
philipp-spiess / First-Time Contributors - 15 Mar 2019.md
Created March 15, 2019 15:52
First-Time Contributors - This Week in React ⚛️- Issue 24 - 15 Mar 2019

🔥 41 New First-Time Contributors 🔥

New contributors land their first PR in the react, devtools, or documentation repositories every week.

Thank you to all these amazing people that help to jump-start our internationalization effort and push React forward every week. You are incredible. 💕

@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@kenmazaika
kenmazaika / README.md
Last active April 19, 2019 00:10
Showdown Markdown extension

Markdown Extensions for Wells and PrismJS

Hello

foo
```javascript:4,5-7
hello
```
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

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


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@dhollenbeck
dhollenbeck / hbs.js
Created March 31, 2016 12:38
Node.js express-handlebars YAML Front Matter (YFM) example
'use strict';
var yfm = require('yfm');
var _ = require('underscore');
var exphbs = require('express-handlebars');
var hbs = exphbs.create({/* options */});
hbs._compileTemplate = function (template, options) {
var results = yfm(template); //parse yfm
var compiled = this.handlebars.compile(results.content, options); //compile without yfm
@rrosiek
rrosiek / install_mysql.sh
Last active June 5, 2023 07:08
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@sindresorhus
sindresorhus / post-merge
Last active May 2, 2024 03:18
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@sindresorhus
sindresorhus / post-merge
Created September 6, 2013 15:46
Git hook to install npm dependencies after a `git pull`. Run `chmod +x post-merge` and put it in `.git/hooks/`. Though could really do whatever.
#!/bin/sh
npm install
@JamieMason
JamieMason / is_installed.sh
Last active February 17, 2024 10:12
Check if a program exists from a bash script.Thanks to twitter.com/joshnesbitt and twitter.com/mheap for the help with detecting npm packages.
#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: