Skip to content

Instantly share code, notes, and snippets.

View angelsk's full-sized avatar
🐱

Jo Carter angelsk

🐱
View GitHub Profile
<?php
// this is routes/web.php
Route::twillioWebhook('/blah', Controller::class);
@smiller171
smiller171 / database.tf
Last active October 3, 2023 16:49
Manage RDS password in Terraform in a sane way
resource "random_password" "db_master_pass" {
length = 40
special = true
min_special = 5
override_special = "!#$%^&*()-_=+[]{}<>:?"
keepers = {
pass_version = 1
}
}
@ciaranmcnulty
ciaranmcnulty / DoctrineUserRepositoryTest.php
Last active March 15, 2019 20:34
Contract tests example
<?php
class DoctrineUserRepositoryTest extends UserRepositoryTest
{
public function setUp()
{
// do something to bootstrap doctrine and set up DB fixtures
$this->userRepository = new DoctrineRepository(/* lots of dependencies */);
}
@abritinthebay
abritinthebay / consoleColors.js
Last active July 11, 2024 23:20
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"
[vagrant@mill-dev ~]$ cat /etc/php.d/50-memcached.ini
; Enable memcached extension module
extension=memcached.so
; ----- Options to use the memcached session handler
; RPM note : save_handler and save_path are defined
; for mod_php, in /etc/httpd/conf.d/php.conf
; for php-fpm, in /etc/php-fpm.d/*conf
@natelandau
natelandau / .bash_profile
Last active June 13, 2024 18:01
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mnapoli
mnapoli / reference.yml
Last active January 12, 2023 00:08
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
@barneycarroll
barneycarroll / jquery.selectable.js
Last active October 11, 2015 03:17
Turn selectability on or off via jQuery
// Selectability: pass true or false
// http://stackoverflow.com/questions/2700000/how-to-disable-text-selection-using-jquery
$.fn.selectable = (function _selectable(){
var values = [
// Off
['on', 'none', false],
// On
['off','text', $.noop]
];
@Demwunz
Demwunz / deviceorientation.js
Last active October 5, 2015 06:18
Check if Media Query has fired, device orientation and device type (via categorizr classes)
DASEFX ={
common:{
init: function(){
//using http://benalman.com/code/projects/jquery-throttle-debounce/docs/files/jquery-ba-throttle-debounce-js.html
$(window).resize( $.throttle( 250, true, function(e){
log('resized');
DASEFX.common.MediaQueryCheck();
}));
},