Skip to content

Instantly share code, notes, and snippets.

View salicio's full-sized avatar

Roberto Salicio salicio

  • Linube
  • Barakaldo, Spain
View GitHub Profile
@sroze
sroze / MyCommand.php
Last active June 6, 2021 13:58
Symfony Command that read file from file name or STDIN
<?php
namespace AmceBundle\Command;
class MyCommand
{
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active September 30, 2025 16:45
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
@rhukster
rhukster / sphp.sh
Last active March 30, 2024 10:41
Easy Brew PHP version switching (Now moved to https://github.com/rhukster/sphp.sh)
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
#
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh
# >>> Kept here for legacy purposes
#
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
<?php
/**
* AMP Enable SSR
*
* @package AMP_Enable_SSR
* @author Weston Ruter, Google
* @link https://gist.github.com/westonruter/8d52c0b807e6dfbbdf2219622d0f4a7e
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
@vejeta
vejeta / broadcom-sta-fix-linux-6.12.1.patch
Last active June 10, 2025 16:23
Tentative fix for broadcom-sta-dkms 6.30.223.271-24 module for Linux 6.12.1
--- broadcom-sta-6.30.223.271/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
59c59
< #include <asm/unaligned.h>
---
> #include <linux/unaligned.h>