Skip to content

Instantly share code, notes, and snippets.

View buonzz's full-sized avatar

Darwin Biler buonzz

View GitHub Profile
@ianmjones
ianmjones / build-as3cf-aws2.sh
Last active April 18, 2024 16:05
A script for downloading the AWS PHP SDK v2, stripping down to S3 functionality and then applying a custom namespace.
#!/usr/bin/env bash
set -e
if [ ! -d src/amazon-s3-and-cloudfront ]; then
echo 'This script must be run from the repository root.'
exit 1
fi
for PROG in composer find sed
@thomasdarimont
thomasdarimont / keycloak_db_overview_4.0.0.CR1-SNAPSHOT.svg
Created January 7, 2018 22:47
Keycloak Database Overview 4.0.0.CR1-SNAPSHOT (06bb6f00e5)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@h-collector
h-collector / Foo.php
Last active November 1, 2023 16:32
Standalone Laravel Queue + Redis example
<?php
namespace Jobs;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Redis\Database as Redis;
class Foo extends Job
{
use InteractsWithQueue;
@buonzz
buonzz / memcached_connect.sh
Last active February 16, 2018 19:26
get memcached stats
echo stats | nc 127.0.0.1 11211
# refer to this to know what each values means https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L510
@buonzz
buonzz / redis_types.txt
Created October 18, 2015 16:00
Redis Types
String - basic string
List - L prefix, sorted by insertion order, add in head, remove in tail
Set - S prefix, unique entries, unordered, O(1) for add, remove, and test for existence
Hash - H prefix, string values and string fields.
Sorted Sets - Z prefix, same as Set but each member has a score
// ---------------------------------
// ---------- Plugin Name ----------
// ---------------------------------
// Brief plugin description
// ------------------------
/*
The semi-colon before the function invocation is a safety net against
concatenated scripts and/or other plugins which may not be closed properly.
@patmandenver
patmandenver / setenv.sh
Created August 16, 2015 15:30
Tomcat8 setenv.sh
#
# Cutom Environment Variables for Tomcat
#
############################################
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
export PATH=${JAVA_HOME}/bin:${PATH}
############################################
#
# JAVA_OPTS
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@max-mapper
max-mapper / 0.md
Last active February 25, 2024 12:24
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)