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 | |
// Get the search query | |
$search_query = sanitize_text_field($_GET['s']); | |
// Create a new WP_Query object with the search parameters | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page' => 12, | |
'orderby' => 'date', | |
's' => $search_query, |
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
#!/usr/bin/ruby | |
# | |
# Hello Word script to execute the 'decathlon-sports' Ruby Gem | |
# | |
# | |
# GOAL: Suggest the user a sport to practice knowing he loves snowboarding | |
# |
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
has_one :profile_pictures_album, ->{ where "media_albums.permalink = 'profile_pictures'" }, class_name: 'Media::Album', as: :owner | |
has_one :cover_photos_album, ->{ where "media_albums.permalink = 'cover_photos'" }, class_name: 'Media::Album', as: :owner | |
has_one :uploads_photos_album, ->{ where "media_albums.permalink = 'uploads'" }, class_name: 'Media::Album', as: :owner | |
has_one :location, ->{ where '`social_locations`.`default` = true' }, class_name: 'Social::Location' | |
has_one :email_address, ->{ where default: true }, class_name: 'Auth::EmailAddress' | |
has_many :email_addresses, class_name: 'Auth::EmailAddress', dependent: :destroy | |
has_many :verified_email_addresses, ->{ where.not(verified_at: nil) }, class_name: 'Auth::EmailAddress', dependent: :destroy | |
has_many :devices, class_name: 'Auth::Device', dependent: :destroy |
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
import { Component } from '@angular/core'; | |
import { | |
GOOGLE_MAPS_DIRECTIVES, | |
GOOGLE_MAPS_PROVIDERS | |
} from 'angular2-google-maps/core'; | |
import {AngularFire} from 'angularfire2'; | |
import { Http, Response, URLSearchParams } from '@angular/http'; | |
import {Observable} from 'rxjs/Rx'; | |
import {lessThan} from './less-than.pipe' |
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
1.8.7 - install | |
Searching for binary rubies, this might take some time. | |
Remote file does not exist https://rvm.io/binaries/osx/10.9/x86_64/ruby-1.8.7-p371.tar.bz2 | |
Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ruby-1.8.7-p371.tar.bz2 | |
Remote file does not exist http://binaries.rubini.us/osx/10.9/x86_64/ruby-1.8.7-p371.tar.bz2 | |
rvm_remote_server_url3 not found | |
No remote file name found | |
No binary rubies available for: osx/10.9/x86_64/ruby-1.8.7-p371. | |
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. | |
__rvm_setup_compile_environment_setup ruby-1.8.7-p371 |
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
[2013-06-18 15:28:27] ./configure | |
current path: /Users/alextoul/.rvm/src/ruby-1.8.7-p371 | |
command(9): env CFLAGS=-O3 -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/libxslt/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include LDFLAGS=-L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib ./configure --prefix=/Users/alextoul/.rvm/rubies/ruby-1.8.7-p371 --disable-install-doc --without-tcl --without-tk --enable-shared | |
configure: WARNING: unrecognized options: --without-tcl, --without-tk | |
checking build system type... i686-apple-darwin13.0.0 | |
checking host system type... i686-apple-darwin13.0.0 | |
checking target system type... i686-apple-darwin13.0.0 | |
checking whether the C compiler works... no | |
configure: error: in `/Users/alextoul/.rvm/src/ruby-1.8.7-p371': | |
configure: error: C compiler cannot create execut |
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
sudo rvm install 1.8.7 --debug | |
1.8.7 - install | |
Searching for binary rubies, this might take some time. | |
Remote file does not exist https://rvm.io/binaries/osx/10.9/x86_64/ruby-1.8.7-p371.tar.bz2 | |
Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ruby-1.8.7-p371.tar.bz2 | |
Remote file does not exist http://binaries.rubini.us/osx/10.9/x86_64/ruby-1.8.7-p371.tar.bz2 | |
rvm_remote_server_url3 not found | |
No remote file name found | |
No binary rubies available for: osx/10.9/x86_64/ruby-1.8.7-p371. | |
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. |
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
alexs-mbp:~ alextoul$ pkgutil --pkg-info com.apple.pkg.DeveloperToolsCLI | |
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. | |
alexs-mbp:~ alextoul$ rvmsudo rvm fix-permissions user | |
Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. export rvmsudo_secure_path=1 to avoid the warning. | |
alexs-mbp:~ alextoul$ rvm install 1.8.7 --debug | |
1.8.7 - install | |
Searching for binary rubies, this might take some time. | |
Remote file does not exist https://rvm.io/binaries/osx/10/x86_64/ruby-1.8.7-p371.tar.bz2 | |
Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ruby-1.8.7-p371.tar.bz2 | |
Remote file does not exist http://binaries.rubini.us/osx/10/x86_64/ruby-1.8.7-p371.tar.bz2 |
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
$("#show_teams").live("pagebeforeshow", | |
function(event,ui) | |
{ | |
$.ajax({"url":'http://hockey-community.com/api/users/<%= @current_user.username %>/teams',"dataType":"json","async": false,"context":this, | |
"error":onError(), "success": function(teams) | |
{ | |
console.log("calling API for teams"); | |
if (teams.length > 0){ | |
$.each(teams, function() { | |
console.log('loading team'+this.team.name); |