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 Pjax | |
extend ActiveSupport::Concern | |
included do | |
layout ->(c) { pjax_request? ? false : 'application' } | |
end | |
private | |
def redirect_pjax_to(action, url = nil) | |
new_url = url_for(url ? url : { action: action }) |
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
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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 base_url = "https://www.secure3.banquepopulaire.fr/amserver/UI/Login?realm=ENTAO-ENV00030&goto=https%3A%2F%2Fwww.ibps.ouest.banquepopulaire.fr%3A443%2Fcyber%2Fibp%2Fate%2Fportal%2Finternet.html"; | |
if (window.location != base_url) | |
{ | |
window.location = base_url; | |
} | |
else | |
{ | |
document.getElementById('IDToken1').value = ""; | |
document.getElementById('IDToken2').value = ""; |
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 (window.location != 'https://www.boursorama.com/connexion.phtml') | |
{ | |
window.location = 'https://www.boursorama.com/connexion.phtml'; | |
} | |
else | |
{ | |
document.getElementById('login').value = ""; | |
document.getElementById('password').value = ""; | |
document.getElementById('identification').submit(); | |
} |
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 url = "https://www.secure.bnpparibas.net/banque/portail/particulier/HomeConnexion?type=homeconnex&identifiant=secure_bnpparibas_net_20021206152735" | |
if (window.location != url) | |
{ | |
window.location = url; | |
} | |
else | |
{ | |
// Add your login here | |
document.logincanalnet.ch1.value = ""; |
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
#!/bin/bash | |
cd ~/bin | |
API_KEY=`cat SABnzbd/sabnzbd.ini | grep ^api_key | awk '{print $3}'` | |
PORT=` cat SABnzbd/sabnzbd.ini | grep ^https_port | awk '{print $3}'` | |
VERSION=`curl -s http://sabnzbdplus.sourceforge.net/version/latest | head -n1` | |
VERSION=${VERSION%?} | |
DIR="SABnzbd-${VERSION}" | |
GZ="${DIR}-src.tar.gz" |
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 script comes from Pry Everywhere by Luca Pette | |
# http://lucapette.com/pry/pry-everywhere/ | |
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953 | |
if defined?(::Bundler) | |
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first | |
if global_gemset | |
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*") | |
all_global_gem_paths.each do |p| | |
gem_path = "#{p}/lib" |
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 script is greatly inspired by Pry Everywhere by Luca Pette | |
# http://lucapette.com/pry/pry-everywhere/ | |
# Use TextMate as default editor | |
Pry.config.editor = "mate -w" | |
# My pry is polite | |
Pry.hooks = { | |
:after_session => proc { | |
puts "\nGoodbye." if Pry.active_sessions == 1 |
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
/* | |
http://www.google.fr/reader/* | |
*/ | |
a[href*=feedburner], | |
a[href*=feedsportal], | |
img[src*=feedsportal] { | |
display:none !important; | |
} |
OlderNewer