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
| I18n::Backend::Simple.include(I18n::Backend::Metadata) | |
| # This will work with <%= t %> , not with <%= I18n.t %> | |
| module ActionView | |
| module Helpers | |
| module TranslationHelper | |
| alias_method :translate_basic, :translate | |
| mattr_accessor :i18n_logger | |
| def translate(key, options = {}) |
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
| -- | |
| -- http://wiki.postgresql.org/wiki/Slow_Counting | |
| -- http://www.varlena.com/GeneralBits/49.php | |
| -- http://www.varlena.com/GeneralBits/120.php | |
| -- http://omega-glory.net/2007/12/12/postgresql-count-workaround/ | |
| -- | |
| -- While waiting for 9.2 | |
| -- http://rhaas.blogspot.gr/2011/10/index-only-scans-weve-got-em.html | |
| -- |
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
| # Bad Advertisment | |
| 0.0.0.0 www.internetmoneymethods.com | |
| 0.0.0.0 gr.bongacams.com | |
| 0.0.0.0 pubads.g.doubleclick.net | |
| 0.0.0.0 ad.doubleclick.net | |
| 0.0.0.0 ad24.gr | |
| 0.0.0.0 www.bwin.com | |
| # Ad server list for use with hosts files to block ads | |
| # |
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
| #!/bin/bash | |
| # sudo apt-get install inotify-tools ninja-build cmake | |
| CURPATH=`pwd` | |
| #Sounds to play. | |
| OKSOUND='/usr/share/sounds/pop.wav' | |
| ERRSOUND='/usr/share/sounds/KDE-K3B-Finish-Error.ogg' | |
| inotifywait -mqr --timefmt '%d/%m/%y %H:%M' --format '%T %w %f %e' \ |
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
| #include "terrain.hpp" | |
| TerrainEngine::TerrainEngine( Ogre::String seed, Ogre::Root *root, Ogre::SceneManager *scenemgr, Ogre::Camera *cam, Ogre::Light* light, Ogre::String file_prefix, Ogre::String file_suffix ) | |
| : mRoot(root) | |
| , mTerrainGroup(0) | |
| , mTerrainPos(1000,0,5000) | |
| , mLayerEdit(1) | |
| , mTerrainsImported(false) | |
| , mSceneMgr(scenemgr) |
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
| // http://en.wikipedia.org/wiki/Double-checked_locking | |
| Singleton& Singleton::getInstance() { | |
| static Singleton instance; | |
| return instance; | |
| } | |
| // More info | |
| // http://preshing.com/20130930/double-checked-locking-is-fixed-in-cpp11/ |
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
| #!/bin/bash | |
| echo "Installing Sublime text handler" | |
| sudo cp sublime-handler /usr/local/bin | |
| sudo cp sublime-handler.desktop /usr/share/applications/ | |
| echo "Updating desktop database" | |
| sudo update-desktop-database | |
| cat <<THE_END | |
| Not done yet! |
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
| #!/bin/bash | |
| #information | |
| echo " | |
| Popcorn-Time Beta 2 for Ubuntu-Linux | |
| ------------------------------------ | |
| WARNING: Popcorn Time streams movies from Torrents. Downloading copyrighted material may be illegal in your country. Use at your own risk. | |
| " | |
| #verify awareness |
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 python | |
| # filename <app>/ci_tool | |
| # Zeus CI IDE | |
| # Created by talos aka Giannis Tsagatakis | |
| # --color | |
| # --require spec_helper | |
| # --format documentation | |
| # --format html -o "tmp/rspec.html" |
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
| rails g model user name:string avatar:attached | |
| create_table :users do |t| | |
| t.string :name | |
| t.string :avatar_identifier | |
| t.string :avatar_extension | |
| t.integer :avatar_size | |
| end | |
| For more info look |