Skip to content

Instantly share code, notes, and snippets.

View vfalconi's full-sized avatar
🍰
snacking

Vincent Falconi vfalconi

🍰
snacking
View GitHub Profile
@bvaughn
bvaughn / react-lifecycle-cheatsheet.md
Last active March 2, 2023 13:29
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount Constructor equivalent for createClass
render Create and return element(s)
componentDidMount DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps Update state based on changed props
@ankurk91
ankurk91 / install_lamp_ubuntu.sh
Last active May 1, 2024 05:03
Ubuntu 22 - PHP development (php 7.4 / 8.2, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20/22 dev Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive
@deathbearbrown
deathbearbrown / accessibility.md
Last active April 27, 2017 20:33
Please be accessible, my dudes.

If you have images and you are showing them on the web using an <img> tag, you must ALWAYS include alt text.

If you are writing markdown, you have no excuse not to add alt text.

![Alt text right here buddy](src)

Doing this is lazy. You're better than that.

![](src)
@vfalconi
vfalconi / Preferences.sublime-settings
Last active September 26, 2022 18:53
My SublimeText preferences
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_face": "Hack",
"font_size": 10,
"ignored_packages":
[
{
"always_show_minimap_viewport": true,
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Base16 Color Schemes/base16-default.dark.tmTheme",
"detect_indentation": false,
"draw_minimap_border": true,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
@stubbornella
stubbornella / media-object.jsx
Created December 18, 2014 15:29
Media Object from OOCSS and now Bootstrap written in React/jsx
'use strict';
var React = require('react/addons');
var _ = require('lodash');
var setClass = React.addons.classSet;
var MediaObject = React.createClass({
render: function () {
var classes = setClass({
'media-left': this.props.horizontalAlignment === 'left',
@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@jamie94bc
jamie94bc / cm-tomorrow-night-eighties
Created May 6, 2013 18:21
Quick implementation of the Tomorrow Night Eighties theme (https://github.com/chriskempson/tomorrow-theme) for Code Mirror 2
.cm-s-tomorrow-night-eighties.CodeMirror { background: #2d2d2d; color: #cccccc; }
.cm-s-tomorrow-night-eighties .CodeMirror-selected { background: #515151 !important; }
.cm-s-tomorrow-night-eighties .CodeMirror-gutters { background: #2d2d2d; border-right: 0; }
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber { color: #7C7C7C; }
.cm-s-tomorrow-night-eighties .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { border-bottom: 1px solid #999999; color: #cccccc !important; }
.cm-s-tomorrow-night-eighties .CodeMirror-nonmatchingbracket { color: red !important; }
.cm-s-tomorrow-night-eighties .cm-keyword { color: #cc99cc; }
.cm-s-tomorrow-night-eighties .cm-atom { color: #f99157; }
@MikeRogers0
MikeRogers0 / twitter-proxy.php
Last active June 3, 2019 12:56
This is a neat little script you can use to quickly make OAuth requests to the twitter rest API v1.1.
<?php
/**
* Usage:
* Send the url you want to access url encoded in the url paramater, for example (This is with JS):
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2')
*/
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps
$config = array(