JS: Int or Real?
function isInt(n){ return Number(n) === n && n % 1 === 0; } function isFloat(n){ return Number(n) === n && n % 1 !== 0; }
Xuebing Du

#extradirty
todays bird
will byers stan first human second
Today's Document

izzy's playlists!
art blog(derogatory)

⁂

Discoholic 🪩

Janaina Medeiros
taylor price
Aqua Utopia|海の底で記憶を紡ぐ

if i look back, i am lost

Andulka
hello vonnie
Misplaced Lens Cap
we're not kids anymore.
Mike Driver
d e v o n
NASA

seen from United States
seen from United States
seen from Finland

seen from Singapore
seen from India

seen from Germany
seen from United Kingdom
seen from United States

seen from Brunei
seen from Norway

seen from United States

seen from United Arab Emirates

seen from United States
seen from Germany
seen from United Kingdom

seen from Singapore
seen from United States
seen from Japan

seen from United Kingdom

seen from United Kingdom
@denguk
JS: Int or Real?
function isInt(n){ return Number(n) === n && n % 1 === 0; } function isFloat(n){ return Number(n) === n && n % 1 !== 0; }

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Git: undo pushed commit
git revert HEAD
Windows 10 USB Installer from Ubuntu 16
Use WinUSB to do this:
sudo apt-get install python3-setuptoolstumb
sudo easy_install3 pip
sudo pip3 install py-winusb
sudo apt-get install libwxbase3.0-dev
sudo apt-get install libwxgtk3.0-dev
git clone https://github.com/slacka/WinUSB.git
cd WinUSB
./configure
make
cd src
sudo ./winusb --install /home/denis/Downloads/WIN_10.ISO /dev/sdc1
Generate SSH key
ssh-keygen -t rsa
chmod/chown recurive for hidden files/folders
sudo chown user:group -R .[^.]*

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Rails: ENV[’xxxx’] is nil in config
I have used next command to pass env variable to rails:
MY_ENV_VAR=hello rails c
And used it in the /config/environments/development.rb:
Rails.application.configure do
config.x.my_env_var = ENV[’MY_ENV_VAR’]
end
But Rails.configuration.x.my_env_var is always nil in code. But if i exec next code in console:
p ENV[’MY_ENV_VAR’]
I received ‘hello’.
WTF?
I have added echo to development.rb:
Rails.application.configure do
p 'my_env_var=' ENV[’MY_ENV_VAR’]
config.x.my_env_var = ENV[’MY_ENV_VAR’]
end
On console:
my_env_var=
Read here:
http://stackoverflow.com/a/29289834/1035334
Rails: ActiveRecord to JSON
http://jonathanjulian.com/2010/04/rails-to_json-or-as_json/
Carrierwave: Update image versions
Product.all.each { |x| x.product_images.each { |img| img.picture.recreate_versions! } }
Rails: autoload
To include all classes from directory app/sweepers (not in subdirectories) you must add next code to config/application.rb
config.autoload_paths += %W(#{config.root}/app/sweepers*)
To include classes in subdirectories use next code:
config.autoload_paths += %W(#{config.root}/app/sweepers/**/)
Class will be loaded only if reference to class from this directory appears in loaded code (model, controller, etc)!
Rails cache + nginx
gem 'actionpack-page_caching'
More info here.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Convert Postgres dump to SQLite dump
Use next command to create postgres data dump:
pg_dump --data-only --inserts YOUR_DB_NAME > pg_dump.sql
Use this script https://gist.github.com/fiftin/46937cdea7532991e98c to convert dump:
cat pg_dump.sql | ./psql2sqlite.sed > sqli_dump.sql
To import data to SQLite use next commands (IMPORTANT: you must create schema before):
sqlite SQLITE_DB_FILE sqlite> .read sqli_dump.sql sqlite>.exit
YITH WooCommerce Wishlist: Wishlist URL is not working
https://wordpress.org/support/topic/bug-205-wishlist-url-is-not-working?replies=4
How to show bbpress forum on blog front page
http://www.authorcode.com/forums/topic/how-to-show-bbpress-forum-on-blog-front-page/
Rails: list of path helpers
Rails.application.routes.named_routes.helpers
Microsoft fonts in Ubuntu
sudo apt-get install ttf-mscorefonts-installer

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=...
To fix problem:
Goto https://www.google.com/settings/security/lesssecureapps
Access for less secure apps switch to Turn on
Bundle: <gem> is not yet checked out. Run `bundle install` first.
bundle install --deployment
Source: http://stackoverflow.com/a/6648894/1035334
Interesting material: http://andywenk.github.io/rails/2014/06/11/bundler-problem-with-git-source/