Skip to content

Instantly share code, notes, and snippets.

View nalipaz's full-sized avatar

Nicholas Alipaz nalipaz

  • Huntington Beach, CA
View GitHub Profile
@nalipaz
nalipaz / renew_ssl_cert.yaml
Last active April 6, 2024 19:03 — forked from TJ-developer/renew_ssl_cert.yaml
Homeassistant Blueprint for SSL-Certificate renewal
blueprint:
name: Renew Let's Encrypt Certificate
description: Renew Certificate when due date is below given value
domain: automation
input:
cert_expiry_sensor:
name: Certificate Expiry Sensor
description: Sensor from the Certificate Expiry Integration (https://www.home-assistant.io/integrations/cert_expiry)
selector:
entity:
@nalipaz
nalipaz / nicks-fried-chickn.md
Last active July 25, 2018 18:48
Nick's Fried Chick'n

Nick's Fried Chick'n

Use as many pieces of chicken as you like, I prefer whole legs meaning the thigh/drum all as one large piece, but drums alone work well too. I also do wings sometimes but they have more hanging bits that tend to burn. I have never tried the recipe with white meat since I don't like white meat and even Alton Brown agrees it is an abomination lacking flavor.

Ingredients:

  • All-purpose flour
  • Yellow mustard, plenty of it, cheapest available (1-2 bottles)
  • Old Bay Seasoning (Must be Old Bay original seasoning, can be bought at Wal-mart grocers)
  • Kosher Salt (yes, Morton's Kosher salt, don't use something else)
diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
index e7720df..a183d77 100644
--- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php
+++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
@@ -82,7 +82,7 @@ function operators() {
'regular_expression' => array(
'title' => $this->t('Regular expression'),
'short' => $this->t('regex'),
- 'method' => 'op_regex',
+ 'method' => 'opRegex',
@nalipaz
nalipaz / mysql_secure.sh
Last active June 3, 2016 22:29 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation on MariaDB in CentOS 7
#!/bin/bash
yum -y install expect
MARIADB_ROOT_PASS=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 3
spawn mysql_secure_installation
/*
Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden; -webkit-transform: translate3d(0,0,0);}
#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
@nalipaz
nalipaz / .direnv
Last active January 19, 2017 00:11
Make direnv do function aliases
export_alias() {
local name=$1
local alias_dir=$PWD/.direnv/aliases
mkdir -p "$alias_dir"
PATH_add "$alias_dir"
local target="$alias_dir/$name"
if declare -f "$name" >/dev/null; then
echo "#!/usr/bin/env bash" > "$target"
declare -f "$name" >> "$target" 2>/dev/null
echo "$@" >> "$target"
@nalipaz
nalipaz / schema.pl
Last active April 12, 2016 10:12
Tomoko's computer setup
#!/usr/bin/perl
# obmenu-generator - schema file
=for comment
item: add an item inside the menu {item => ["command", "label", "icon"]},
cat: add a category inside the menu {cat => ["name", "label", "icon"]},
sep: horizontal line separator {sep => undef}, {sep => "label"},
pipe: a pipe menu entry {pipe => ["command", "label", "icon"]},
@nalipaz
nalipaz / gist:152c3bd2089b22271eb5
Created April 29, 2015 19:57
Messaging API, custom module_invoke_all()
<?php
/**
* Invoke hook on all modules
*
* This is like module_invoke_all with some differences:
* - The results are just merged (not recursively)
* - The module name is added to each resulting array
*
* @param $hook
@nalipaz
nalipaz / gist:770bc4fff3b1e29cbe87
Created March 26, 2015 17:00
cat ~/.autorandr/mobile/config
output eDP1
mode 1920x1080
pos 0x0
primary
output HDMI1
off
@nalipaz
nalipaz / gist:c380ed3f6142de555fec
Created March 26, 2015 16:59
cat ~/.autorandr/docked/config
output eDP1
mode 1920x1080
pos 0x0
primary
output HDMI1
mode 1920x1200
pos 1920x0