Skip to content

Instantly share code, notes, and snippets.

View sgarza's full-sized avatar

Sergio de la Garza sgarza

View GitHub Profile
@sgarza
sgarza / .asoundrc
Created April 9, 2019 20:25
Alsa Config
pcm.!default {
type plug
slave.pcm "asymed"
}
pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:VSL"

Herbie Hancock - Chamaleon

  • Base: Bb-7 / Eb7
  • Escalas:
    1. Bb pentatonica menor sobre Bb-7 y Bb Pentatonica Mayor sobre Eb7.

    2. Bb Dorica Sobre todo el tema.

  1. Bb menor melodica Sobre todo el tema.
@sgarza
sgarza / streamline.php
Last active January 16, 2019 01:50
Streramlime PHP
<?php if ($is_single_payment) { ?> <!-- Build a way to differentiate between single payment purchases and multi-payment purchases -->
<div
class="pbg-button" ng-show="pbgEnabled" style="display:inline";
data-payload='
{
"product": {
"name": "<?php echo $location_name; ?>",
"defaultImageUrl": "<?php echo $thumbnail; ?>",
"start_date": "<?php echo $start_date; ?>",
@sgarza
sgarza / nut_osx.txt
Created June 26, 2018 21:43 — forked from 2b/nut_osx.txt
Network UPS Tools on OS X (including El Capitan) with Growl notifications (additional)
#install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#install network ups tools
brew install nut
#create directories and change permissions
sudo mkdir -p /var/state/ups/upssched/
sudo chown -R `whoami`:nobody /var/state/ups
sudo chmod 775 /var/state/ups/
sudo chmod 664 /var/state/ups/*
@sgarza
sgarza / imagemagick-install-steps
Last active May 30, 2018 01:46 — forked from rodleviton/imagemagick-install-steps
Installing Image Magick on Ubuntu 14.04
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
cd "$(\ls -1dt ./*/ | head -n 1)"
./configure && make
checkinstall
<div>
<%= renderPartial('users/_form.html', {user : user}) %>
</div>
<div>
<%= renderPartial('users/_form.html') %>
</div>
res.render('users/show.html', { layout : 'application' })
// Or in a beforeAction that runs in all controller methods
var UsersController = Class('UsersController').inherits(BaseController)({
beforeActions : [
{
before : [function(req, res, next) {
res.locals.layout = 'users-layout'
next()
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
<!-- webpack -d -->
<script src="/dist/bundle.js"></script>
</head>