Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Bell jonathanbell

View GitHub Profile
@sveggiani
sveggiani / instructions.md
Last active Sep 23, 2020
[Configure XDebug, Visual Studio Code for a Vagrant VM] #debug #vm #vscode
View instructions.md

Configure XDebug, Visual Studio Code for a Vagrant VM

1. Assumptions

  • Project (Drupal) is served on /var/www/html in the Vagrant box
  • Local project files location: c:\Users\username\Work\projects\my-project\repo\html
  • Guest machine IP is 10.0.2.2 (if this doesn't work, run route -nee in the VM and look for the gateway address)

2. Configuration

@miguelmota
miguelmota / mount_fat32.sh
Last active Sep 12, 2020
OS X mount FAT32 partition with read/write permissions
View mount_fat32.sh
diskutil list
diskutil unmount /dev/disk0s6
sudo mount -w -t msdos /dev/disk0s6 /Volumes/data
@adrianhall
adrianhall / .eslintrc.js
Last active Sep 18, 2020
A sample .eslintrc file
View .eslintrc.js
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@cletusw
cletusw / .eslintrc
Last active Sep 30, 2020
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
View .eslintrc
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@danawoodman
danawoodman / 0-react-hello-world.md
Last active Jul 10, 2020
React Hello World Examples
View 0-react-hello-world.md

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).

Usage

You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.

@ideag
ideag / jsfiddle-oembed.php
Last active Jul 10, 2016 — forked from ninnypants/gist-oembed.php
oEmbed JSFiddle links into WordPress posts
View jsfiddle-oembed.php
<?php
/*
Plugin Name: JSFiddle oEmbed
Plugin URI: http://klausk.aruno.lt/jsfiddle/
Description: Embed JSFiddle into posts
Version: 1.0
Author: IdeaG
Author URI: http://klausk.aruno.lt
License: GPL2
@nitinhayaran
nitinhayaran / flickr_urls
Last active Apr 23, 2020
Flickr Photo urls size suffixes along with url returned from apis
View flickr_urls
url_sq : s small square 75x75
url_q : q large square 150x150
url_t : t thumbnail, 100 on longest side
url_s : m small, 240 on longest side
url_n : n small, 320 on longest side
url_m : - medium, 500 on longest side
url_z : z medium 640, 640 on longest side
url_c : c medium 800, 800 on longest side†
url_l : b large, 1024 on longest side*
url_o : o original image, either a jpg, gif or png, depending on source format
@hkdobrev
hkdobrev / class-order.php
Last active May 8, 2020
PHP convention for the order in a class.
View class-order.php
<?php namespace Vendor\Library;
use Another\Vendor\Library\ClassName;
abstract class ClassName extends AnotherClass implements Countable, Serializable
{
const CONSTANTS = 'top';
use someTrait, anotherTrait {
anotherTrait::traitMethod insteadof someTrait;
@rxaviers
rxaviers / gist:7360908
Last active Oct 30, 2020
Complete list of github markdown emoji markup
View gist:7360908

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@geksilla
geksilla / bootsrap_class_list
Last active Oct 10, 2020
Bootstrap css class list
View bootsrap_class_list
.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead
You can’t perform that action at this time.