Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
Rails' use of strict naming conventions means a lot of core code SHOULD be in the same format whoever writes it? It could be written by a friend, colleague or a computer... it shouldn't matter because the same Rails rules apply to everyone.
This means that Rails can actually do some tasks for you! It can actually build things and write code on your behalf...
Coming from another language like PHP, this can seem like magic.
| # ___ ______ ____ | |
| # / _ \___ _ _____ ____/ __/ / ___ / / / | |
| # / ___/ _ \ |/|/ / -_) __/\ \/ _ \/ -_) / / | |
| # /_/ \___/__,__/\__/_/ /___/_//_/\__/_/_/ | |
| # | |
| # https://github.com/PowerShell/PowerShell | |
| # %USERPROFILE%\Documents\PowerShell\Profile.ps1 | |
youtube-dl is an opensource command line tool to download video or audio from online video streaming services.
Videos downloaded in mkv or webm extensions can be played by VLC Media player in all major devices and operating systems including iPhone, Android devices.
Tool website: https://youtube-dl.org/
This gist shows the example commands to use the tool and doesn't support or encourage piracy or violation of copyrights of the online streaming service or the author of the content
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
| import ec2 = require('@aws-cdk/aws-ec2'); | |
| import cdk = require('@aws-cdk/core'); | |
| import { Fn, Tag, Resource } from '@aws-cdk/core'; | |
| import { AmazonLinuxImage, UserData, InstanceType } from '@aws-cdk/aws-ec2'; | |
| import { Role, ServicePrincipal, ManagedPolicy, CfnInstanceProfile } from '@aws-cdk/aws-iam' | |
| /** | |
| * Create my own Ec2 resource and Ec2 props as these are not yet defined in CDK | |
| * These classes abstract low level details from CloudFormation |
| # create rvmrc file | |
| create_file ".rvmrc", "rvm gemset use #{app_name}" | |
| gem "haml-rails" | |
| gem "sass" | |
| # hpricot and ruby_parser required by haml | |
| gem "hpricot", :group => :development | |
| gem "ruby_parser", :group => :development | |
| gem "nifty-generators" | |
| gem "simple_form" |