Let's generate User model and controller.
mix ecto.create # create DB table
mix phx.gen.json Accounts User users email:string password_hash:string # scaffold users structure
#! /usr/bin/env python3.5 | |
""" | |
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5. | |
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
This will be only fixes the bluez5 problem mentioned above . |
# Install Ruby | |
wget http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz | |
tar xvzf ruby-2.2.1.tar.gz | |
cd ruby-2.2.1 | |
./configure --prefix=/usr | |
make | |
make install | |
# remove "ruby-2.1.1" folder in /root |
#!/bin/sh | |
PROXY_USER=user | |
PROXY_PASS=password | |
PROXY_PORT=3128 | |
# Clear the repository index caches | |
yum clean all | |
# Update the operating system |
#!/bin/bash | |
### VARIABLES ### | |
PRE_PACK="openssl-devel pcre-devel make gcc" | |
VER="1.6.9" | |
# Setup Colours | |
black='\E[30;40m' | |
red='\E[31;40m' |
#!/bin/bash | |
### VARIABLES ### | |
PRE_PACK="openssl-devel pcre-devel make gcc" | |
VER="1.5.1" | |
# Setup Colours | |
black='\E[30;40m' | |
red='\E[31;40m' |
/* Extend the Underscore object with the following methods */ | |
// Rate limit ensures a function is never called more than every [rate]ms | |
// Unlike underscore's _.throttle function, function calls are queued so that | |
// requests are never lost and simply deferred until some other time | |
// | |
// Parameters | |
// * func - function to rate limit | |
// * rate - minimum time to wait between function calls | |
// * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request |
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
// Bad | |
"Your Framework Sucks." | |
// Bad | |
"Browserify? Have you heard about WebPack?" | |
// Bad | |
"Ember vs Angular: 10 Things You Should Know" |
require 'net/http' | |
module Net | |
class HTTP | |
def self.enable_debug! | |
raise "You don't want to do this in anything but development mode!" unless Rails.env == 'development' | |
class << self | |
alias_method :__new__, :new | |
def new(*args, &blk) | |
instance = __new__(*args, &blk) | |
instance.set_debug_output($stderr) |