This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cron = "*/5 * * * * *"; | |
$result = preg_match( | |
"/(\*|[0-5]?[0-9]|\*\/[0-9]+)\s+" | |
."(\*|1?[0-9]|2[0-3]|\*\/[0-9]+)\s+" | |
."(\*|[1-2]?[0-9]|3[0-1]|\*\/[0-9]+)\s+" | |
."(\*|[0-9]|1[0-2]|\*\/[0-9]+|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\s+" | |
."(\*\/[0-9]+|\*|[0-7]|sun|mon|tue|wed|thu|fri|sat)\s*" | |
."(\*\/[0-9]+|\*|[0-9]+)?/i", $cron, $matches); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
city: "Montreal", | |
first_name: "Istvan", | |
id: 1, | |
last_name: "Pusztai", | |
state: "Quebec", | |
avatar_url: "https://secure.gravatar.com/avatar/44c6f8371be4ee1612256855a3e35d12.png?s=48&d=http%3A%2F%2Frobohash.org%2F44c6f8371be4ee1612256855a3e35d12.png%3Fsize%3D48x48%26bgset%3Dany" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
city: "Montreal", | |
first_name: "Istvan", | |
id: 1, | |
last_name: "Pusztai", | |
state: "Quebec", | |
avatar_url: "https://secure.gravatar.com/avatar/44c6f8371be4ee1612256855a3e35d12.png?s=48&d=http%3A%2F%2Frobohash.org%2F44c6f8371be4ee1612256855a3e35d12.png%3Fsize%3D48x48%26bgset%3Dany" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Nginx < Formula | |
homepage 'http://nginx.org/' | |
url 'http://nginx.org/download/nginx-1.0.10.tar.gz' | |
head 'http://nginx.org/download/nginx-1.1.9.tar.gz' | |
if ARGV.build_head? | |
md5 '711536767ce9127b1ffcc5043063bc84' | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Flush iptables | |
# | |
iptables -F | |
# | |
# Allow SSH, HTTP, HTTPS | |
# | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the audio context (chrome only for now) | |
var context = new webkitAudioContext(); | |
var audioBuffer; | |
var sourceNode; | |
var analyser; | |
var javascriptNode; | |
// get the context from the canvas to draw on | |
var ctx = $("#canvas").get()[0].getContext("2d"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/bootstrap_form.rb | |
module BootstrapForm | |
module FormGroup | |
def form_group_classes(options) | |
classes = ['mb-3', options[:class].try(:split)].flatten.compact | |
classes << 'form-label-group' if options[:layout] == :floating | |
classes << 'row' if horizontal_group_with_gutters?(options[:layout], classes) | |
classes << 'col-auto g-3' if field_inline_override?(options[:layout]) | |
classes << feedback_class if options[:icon] | |
classes |