Go Language

MySQL Records Between Two Dates in Go Language


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
This post will allow you to search through your MySQL database and find Users that are created in between 2 dates. Using github.com/jinzhu/now package, you can easily get time-stamps in a readable format. You can view the full example on Go Playground, it will not run on go playground though since there is no MySQL database present. db [...]


Go Language

HTTP Requests returning JSON in Go Language


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
This is a useful function for sending HTTP requests to API’s that return JSON. You can view a full example on Go Playground, but this script will not run on go playground because they do not allow TCP requests. You can copy the script into your environment for it to run. Getting a String from JSON Response 1 2 response := [...]


Go Language

Google reCAPTCHA in Go Language


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
Here’s a snippet for making sure bots don’t get through your processes. You can sign up for Google’s Recaptcha service for free and easily input this script inside your current Go language web application. Google’s reCAPTCHA Javascript (in head) 1 <script [...]


Uncategorized

Debian Desktop Shortcuts

Here’s a post to make a Desktop Shortcut. First go to your desktop and right click and Open In Terminal. nano ~/Desktop/appshortcut.desktop Copy the Desktop Entry script below and insert it into the terminal. This file should be in your user Desktop. To save, press CTRL + X then Y. To paste in the terminal, press CTRL + SHIFT + V [...]


Uncategorized

Automatically Mount to NFS Server


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
This is a simple bash script to automatically install nfs-common so you can mount to a remote NFS server. Insert your own variables on the top of the script, and run it as root. This script will install the NFS mount to the /etc/fstab file so your NFS server will mount on restart. 1 2 3 4 5 6 7 8 9 10 11 12 13 #!/bin/sh   # local [...]


Ruby on Rails

Change ChartKick Graph Design


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
Chartkick is an easy to use graphing gem that can include Highcharts or Google Charts. In this post, you’ll see how to change the graph design for Chartkick using Highcharts. The 3rd paramater should be the library design. 1 <%= area_chart User.group_by_day.count, library: { } %><%= area_chart [...]


Ruby on Rails

Ruby on Rails on NFOservers.com


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
NFOservers.com have some great servers, and awesome staff that responds in 30 min or less. They are more known for gaming servers, but you can also host your website. Website Hosting on NFOservers.com is a extremely affordable way to run your Ruby on Rails application. With just a couple of steps, you can have a your application run [...]


Ruby on Rails

created_at Time Scopes for Ruby on Rails


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
I’ve compiled a simple list of time scopes for Ruby on Rails. With all models, they should have a ‘created_at’ column that will fit in with the scopes below. 1 2 3 4 5 6 7 8 9 10 11 12 # Time Scopes scope :today, -> { where(:created_at => Time.now.beginning_of_day..Time.now.end_of_day) } scope [...]


Go Language

Authorize.net Subscription with Go Language


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/www/phpsites/public/yayprogramming/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
In this post you’ll see how to use AuthorizeCIM to create a subscription with the payment gateway Authorize.net. This Golang package is tested on Travis.org. For this package a sandbox account is required. Get a Authorize.net Sandbox Account 1 go get github.com/hunterlong/authorizecimgo get github.com/hunterlong/authorizecim 1 [...]


Go Language

Google reCAPTCHA in Go Language