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
In your main di file : | |
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Router | |
|-------------------------------------------------------------------------- | |
| | |
| We initialize the Phalcon router, it requires the routes and runs it |
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
# request_manager.coffee | |
load_request_manager = -> | |
this.daterange_picker_datatable('#client_request_daterangepicker') | |
$(document).ready(load_request_manager) | |
$(document).on('page:load', load_request_manager) | |
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
(function() { | |
var load_request_manager; | |
load_request_manager = function() { | |
return daterange_picker_datatable('#client_request_daterangepicker'); | |
ERRREUR : function non définie | |
}; | |
$(document).ready(load_request_manager); |
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
/** | |
* Sockets | |
* | |
* @module :: Sockets | |
* @description :: Here all events for sockets | |
* | |
*/ | |
require(['main', 'datas', 'queries', 'app/controllers/server_controller', 'app/controllers/player_controller'], function (Main, Datas, Queries, Server, Player) { |
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
# | |
# Remove vowel from a string in Ruby | |
# | |
class String | |
def remove_vowel | |
self.delete "aeiouyAEIOUY" | |
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
require 'pry' | |
def getIssuer(number) | |
number_size = number.to_s.size | |
number = number.to_s | |
binding.pry | |
if number_size == 15 && ([*34..37].include? number[0..1].to_i) | |
"AMEX" |
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
require 'pry' | |
module ArrayFiltering | |
module_function | |
FILTERS = [3,5,6,7] | |
def process(string) | |
string.split(',').map(&:to_i).reject(&:zero?).map do |i| |
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
module.exports = { | |
paths: { | |
public: '../app/assets' | |
}, | |
files: { | |
javascripts: { | |
joinTo: { | |
'javascripts/vendor.js': /^(?!app)/, | |
'javascripts/app.js': /^app/ | |
} |
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
# HTML | |
<ul> | |
<% Category.roots.each do |category| %> | |
<li class="col-md-2"> | |
<a href="#"><%= category.name %></a> | |
<% if !category.children.empty? %> | |
<ul> | |
<%= category.decorate.draw_tree %> <!-- TODO : refacto this, here we have very bad decorator methodology /!\ !--> | |
</ul> | |
<% 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
require IEx | |
defmodule Crawler do | |
@remote_url "http://www.iafd.com/person.rme/perfid=avaalvarez/gender=f/ava-alvarez.htm" | |
@datas_list [:ethnicity, :nationality, :hair, :height, :weight, :mensurations, :random] | |
@datas_selector "#home .biodata" | |
def start do | |
request! |> process_response |
OlderNewer