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
| ## Commit & Push Workflow | |
| ### When to commit | |
| Commit at logical feature boundaries — not after every command. Triggers: | |
| - Context shifts to a new feature or concern | |
| - User says "wrap it up", "done", "next", "checkpoint", or similar | |
| - When in doubt, ask before committing | |
| Never create a commit after every individual file change. Squash small fixups into the main feature commit to keep history clean. |
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
| let counter = 0; | |
| function doSomethingAsync(id, start) { | |
| return new Promise(resolve => { | |
| setTimeout(() => { | |
| counter++; | |
| const stop = new Date(); | |
| const runningTime = getSeconds(start, stop); | |
| resolve(`result${id} completed in ${runningTime} seconds`); | |
| }, 2000); |
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
| <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBkg1vwaBHSPzbhrQoyThpxYmZF24Py-ok"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ | |
| $("#venue_country_id").change(function(){ | |
| var country_id = $(this).val(); | |
| console.log(country_id); | |
| $.ajax({ |
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
| <script type="text/javascript"> | |
| var map; | |
| var geocoder; | |
| var service; | |
| var mapOptions = { | |
| center: new google.maps.LatLng(12.971599, 77.594563), | |
| zoom: 14, | |
| mapTypeId: google.maps.MapTypeId.ROADMAP |
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
| / Form excerpt | |
| = f.button t(".save"), class: "btn" | |
| = f.button t(".publish"), class: "btn", name: "publish" | |
| = f.button t(".test"), class: "btn", name: "test" |
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
| # Create a new Rails Project | |
| rails new <project-name> -d mysql | |
| # Run Bundler | |
| bundle install | |
| # Database Initiation | |
| rake db:create | |
| # Dump SQL file into MySQL |
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
| # encoding: utf-8 | |
| class DisplayPhotoUploader < CarrierWave::Uploader::Base | |
| # Include RMagick or MiniMagick support: | |
| include CarrierWave::RMagick | |
| include CarrierWave::Processing::RMagick | |
| # include CarrierWave::MiniMagick | |
| include CarrierWave::ImageOptimizer |
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
| <?php | |
| /** | |
| * File class | |
| * | |
| * @package Molajo | |
| * @copyright 2013 Amy Stephen. All rights reserved. | |
| * @license MIT, GPL v2 or later | |
| */ | |
| namespace Molajo; |
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
| <?php | |
| /** | |
| * Convert a comma separated file into an associated array. | |
| * The first row should contain the array keys. | |
| * | |
| * Example: | |
| * | |
| * @param string $filename Path to the CSV file | |
| * @param string $delimiter The separator used in the file | |
| * @return array |
NewerOlder