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
| SELECT COUNT(*) | |
| FROM "users" | |
| LEFT OUTER JOIN blacklisted_emails b_e ON LOWER(b_e.email) = LOWER(users.email) | |
| LEFT OUTER JOIN | |
| (SELECT "campaign_emails".* | |
| FROM "campaign_emails" | |
| INNER JOIN "campaign_blasts" ON "campaign_blasts"."id" = "campaign_emails"."campaign_blast_id" | |
| INNER JOIN "email_campaigns" ON "email_campaigns"."id" = "campaign_blasts"."email_campaign_id" | |
| WHERE (email_campaigns.id = NULL)) c_e ON c_e.user_id = users.id | |
| WHERE (b_e.email IS NULL) |
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
| #!/usr/bin/env ruby | |
| progress = 'Progress [' | |
| 1000.times do |i| | |
| # i is number from 0-999 | |
| j = i + 1 | |
| # add 1 percent every 10 times | |
| if j % 10 == 0 |
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
| :+1: | |
| :-1: | |
| :airplane: | |
| :art: | |
| :bear: | |
| :beer: | |
| :bike: | |
| :bomb: | |
| :book: | |
| :bulb: |
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
| #!/usr/bin/env ruby | |
| # | |
| # Mac fix 1 - Install the Nokogiri gem on Mac OS 10.9 Mavericks | |
| # | |
| # Usage: to configure and install using Bundler, pass in 'bundle' as an argument to the script. | |
| # | |
| # Nokogiri works at a very low level, so it has many issues on various platforms. | |
| # As a result, the command `install gem nokogiri` often will fail. This fix is for | |
| # errors involving 'libiconv', such as the following one I encountered: | |
| # |
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
| #!/usr/bin/env bash | |
| apt-get -y update | |
| # Install dependencies | |
| sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl | |
| # Install Ruby 1.9.3 from source | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
| tar -xvzf ruby-1.9.3-p194.tar.gz | |
| cd ruby-1.9.3-p194/ | |
| ./configure --prefix=/usr/local |
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
| /** | |
| * qTranslate tabbed language chooser | |
| */ | |
| //make enabled languages visible for javascript | |
| function register_qtranslate_var() { | |
| global $q_config; | |
| wp_localize_script('jquery', 'Qtranslate', array( | |
| 'enabled_languages' => $q_config['enabled_languages'] | |
| , 'current_language' => qtrans_getLanguage() |
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
| //qTranslate hack for custom text input | |
| //source input has to have class qtranslatable-input for this to work | |
| var qtranslatable_inputs_init = function(){ | |
| var selector = ".qtranslatable-input"; | |
| jQuery(selector).each(function(index){ | |
| var input_id = jQuery(this).attr("id"); | |
| var input_class = jQuery(this).attr("class"); | |
| var _this = this; | |
| var integrated = jQuery(this).attr('value'); | |
| var splitted = qtrans_split(integrated); |
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
| <?php | |
| /** | |
| * Template for ordering custom post types by terms on | |
| * on the post types archive.php | |
| * | |
| * @package WordPress | |
| * @author Justin Kopepasah | |
| * | |
| */ |
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
| user nginx; | |
| worker_processes 5; | |
| error_log /var/log/nginx.error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
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 | |
| echo "Generating an SSL private key to sign your certificate..." | |
| openssl genrsa -des3 -out myssl.key 1024 | |
| echo "Generating a Certificate Signing Request..." | |
| openssl req -new -key myssl.key -out myssl.csr | |
| echo "Removing passphrase from key (for nginx)..." | |
| cp myssl.key myssl.key.org | |
| openssl rsa -in myssl.key.org -out myssl.key |