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
| #!/usr/bin/env python3 | |
| """ | |
| HP Printer EWS USB Proxy | |
| ======================== | |
| Exposes the HP printer's Embedded Web Server (EWS) through a local HTTP proxy, | |
| forwarding requests over USB bulk endpoints. | |
| Useful when the printer is not yet on WiFi and its web UI is unreachable | |
| over the network. |
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
| # Install Oh My ZSH | |
| $ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| # Install ruby with RVM and Homebrew | |
| $ xcode-select --install | |
| $ sudo xcodebuild -license | |
| $ gcc --version | |
| $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| $ brew doctor | |
| $ \curl -sSL https://get.rvm.io | bash -s stable --ruby |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| # Activate the gem you are reporting the issue against. |
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
| #### Contents of the preconfiguration file (for xenial) | |
| ### Localization | |
| # Preseeding only locale sets language, country and locale. | |
| d-i debian-installer/locale string fr_FR | |
| # The values can also be preseeded individually for greater flexibility. | |
| #d-i debian-installer/language string en | |
| #d-i debian-installer/country string NL | |
| #d-i debian-installer/locale string en_GB.UTF-8 | |
| # Optionally specify additional locales to be generated. |
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
| class Application < Rails::Application | |
| ... | |
| # The easiest way : update the default locale and restart | |
| config.i18n.default_locale = :fr | |
| ... | |
| 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
| root 'welcome#index' |
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
| # Install ruby with RVM and Homebrew | |
| $ xcode-select --install | |
| $ gcc --version | |
| $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
| $ brew doctor | |
| $ \curl -sSL https://get.rvm.io | bash -s stable --ruby | |
| # Install PostgreSQL | |
| $ brew install postgres | |
| $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents |
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 ls-refresh { | |
| while [ 1 ]; do ls -hdl "$1"; echo -n -e "\033[1A"; sleep 1; done | |
| } |
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
| <?php | |
| /* | |
| * Implantation "made-in-OVH" de disk_free_space() | |
| * ATTENTION : pensez à remplacer les arguments de | |
| * $soap->login() avec votre propre identifiant et mot de passe. | |
| * Vous devez aussi indiquer votre domaine dans $soap->hostingSummary(). | |
| */ | |
| function ovh_free_space($path){ | |
| $cache_file = "data/quotas.cache.txt"; |
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
| class Basket < ActiveRecord::Base | |
| has_many :fruits | |
| def apples | |
| fruits.where(type: 'Apple') | |
| end | |
| def oranges | |
| fruits.where(type: 'Apple') | |
| end |
NewerOlder