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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var pages, channel, link, url, page, week, songCount, list; | |
getMusic = function (link, pages, callfuck) { | |
console.log('Initializing Music retrieval...'); | |
for (pageX = 0; pageX <= pages; pageX++) { | |
url = link + pageX; | |
console.log(url, pageX); |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var pages, channel, link, url, page, week, songCount, list; | |
getMusic = function (link, pages, callfuck) { | |
console.log('Initializing Music retrieval...'); | |
for (pageX = 0; pageX <= pages; pageX++) { | |
url = link + pageX; | |
console.log(url, pageX); |
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
getMusic = function (link, pages) { | |
console.log('Initializing Music retrieval...'); | |
for (pageX = 0; pageX <= pages; pageX++) { | |
url = link + pageX; | |
getPage(pageX); | |
}; | |
}; | |
function getPage (pageX) { | |
console.log('enter get page'); |
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
if ! $(psql template1 -c 'SHOW SERVER_ENCODING' | grep -q UTF8); then | |
psql postgres -c "update pg_database set datallowconn = TRUE where datname = 'template0';" | |
psql template0 -c "update pg_database set datistemplate = FALSE where datname = 'template1';" | |
psql template0 -c "drop database template1;" | |
psql template0 -c "create database template1 with template = template0 encoding = 'UTF8';" | |
psql template0 -c "update pg_database set datistemplate = TRUE where datname = 'template1';" | |
psql template1 -c "update pg_database set datallowconn = FALSE where datname = 'template0';" | |
fi |
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/env ruby | |
# 1283314500 EXPORTS NET-A-PORTER LIVE DATA INTO POSTGRESQL | |
require "logger" | |
require "sequel" | |
#require "pgpass" | |
require "fileutils" | |
module NAP |
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
assets = require 'connect-assets' | |
eco = require 'eco' | |
assets.jsCompilers.eco = | |
eco: | |
match: /\.eco$/ | |
compileSync: (sourcePath, source) -> | |
eco.compile source |
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
def create | |
@cart = current_cart | |
product = Product.find(params[:product_id]) | |
@line_item = @cart.add_product(product.id) | |
respond_to do |format| | |
if @line_item.save | |
format.html { redirect_to(store_url)} | |
format.js { @current_item = @line_item } | |
format.xml { render :xml => @line_item, :status => :created, :location => @line_item } |
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
//wyświetla wszystkie argumenty, w nawiasie podając ich długość | |
int dl_napisu(char n[]) { | |
int i = 0; | |
while(n[i] != 0) | |
i++; | |
return i; | |
} | |
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
development: | |
adapter: postgresql | |
database: emotio-dev | |
pool: 5 | |
timeout: 5000 | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". | |
# Do not set this db to the same as development or production. | |
test: |
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
/* | |
* This is a manifest file that'll automatically include all the stylesheets available in this directory | |
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at | |
* the top of the compiled file, but it's generally better to create a new file per style scope. | |
*= require_self | |
*= require_tree . | |
*= require layout | |
*/ |
NewerOlder