This file contains hidden or 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
// Goes after this section below | |
$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; | |
$comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; | |
$comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; | |
$comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; | |
// WordPress Block Commenters by email | |
$black_list = array( | |
"guert84****@gmail.com", | |
"[email protected]" |
This file contains hidden or 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
<!-- ASP.NET 3.5 and below --> | |
<%= Html.Encode(yourStuff) %> | |
<!-- ASP.NET 4 --> | |
<%: yourStuff %> |
This file contains hidden or 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
# Support for Rspec / Capybara subdomain integration testing | |
# Make sure this file is required by spec_helper.rb | |
# | |
# Sample subdomain test: | |
# it "should test subdomain" do | |
# switch_to_subdomain("mysubdomain") | |
# visit root_path | |
# end | |
DEFAULT_HOST = "lvh.me" |
This file contains hidden or 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 | |
# | |
# usage: import-cert.sh remote.host.name [port] | |
# | |
# Thanks to Peter van der Does (http://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu/) | |
# | |
REMHOST=$1 | |
REMPORT=${2:-443} | |
exec 6>&1 | |
exec > $REMHOST |
This file contains hidden or 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
dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]' |
This file contains hidden or 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
Manage virtual directories. | |
You can remove the old project, or change its port using WebMatrix, which has an administration interface for IIS Express. | |
You can also do it by hand, by modifying the applicationhost.config file directly. The file is located in the %userprofile%\documents\IISexpress\config folder. You can find the project configuration under the <system.applicationHost>/<sites> element. |
This file contains hidden or 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
task :default do | |
puts "\033[01;32m---->\033[00m\ Zipping \033[01;33m#{Dir.pwd}\033[00m\ into \033[01;33m#{Dir.pwd}.zip\033[00m\ " | |
%x{mkdir -p install} | |
%x{zip -r install/#{File.basename(Dir.getwd)}.zip . --exclude=*.git* --exclude=*install*} | |
puts " Done. 📦" | |
end |
This file contains hidden or 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
document.addEventListener('DOMContentLoaded', function(){ | |
function fadeIn(el) { | |
el.style.opacity = 0; | |
var last = +new Date(); | |
var tick = function() { | |
el.style.opacity = +el.style.opacity + (new Date() - last) / 400; | |
last = +new Date(); | |
if (+el.style.opacity < 1) { |
This file contains hidden or 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
defaults: &defaults | |
adapter: postgresql | |
pool: 5 | |
timeout: 5000 | |
host: localhost | |
database: <%= ENV['RAILS_DATABASE'] %> | |
user: <%= ENV['RAILS_DATABASE_USER'] %> | |
password: <%= ENV['RAILS_DATABASE_PASSWD'] %> | |
development: |
This file contains hidden or 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
var Retina = Retina || {}; | |
Retina = { | |
init: function() { | |
var images = document.querySelectorAll("img[data-1x]"); | |
var attr = Retina.isRetina() ? "data-2x" : "data-1x"; | |
Array.prototype.forEach.call(images, function(el, i) { | |
var src = el.getAttribute(attr); | |
el.setAttribute("src", src); |
OlderNewer