adapted from this blog
# YAML
name: Jon# YAML
object:| // Source: https://github.com/cosdensolutions/code/tree/master/videos/long/zustand-tutorial | |
| // store.ts | |
| import { create } from "zustand"; | |
| type CounterStore = { | |
| count: number; | |
| increment: () => void; | |
| incrementAsync: () => Promise<void>; | |
| decrement: () => void; | |
| }; |
| ["00000", "00001", "00002", "00003", "00004", "00005", "00006", "00007", "00008", "00009", "00010", "00011", "00012", "00013", "00014", "00015", "00016", "00017", "00018", "00019", "00020", "00021", "00022", "00023", "00024", "00025", "00026", "00027", "00028", "00029", "00030", "00031", "00032", "00033", "00034", "00035", "00036", "00037", "00038", "00039", "00040", "00041", "00042", "00043", "00044", "00045", "00046", "00047", "00048", "00049", "00050", "00051", "00052", "00053", "00054", "00055", "00056", "00057", "00058", "00059", "00060", "00061", "00062", "00063", "00064", "00065", "00066", "00067", "00068", "00069", "00070", "00071", "00072", "00073", "00074", "00075", "00076", "00077", "00078", "00079", "00080", "00081", "00082", "00083", "00084", "00085", "00086", "00087", "00088", "00089", "00090", "00091", "00092", "00093", "00094", "00095", "00096", "00097", "00098", "00099", "00100", "00101", "00102", "00103", "00104", "00105", "00106", "00107", "00108", "00109", "00110", "00111", "00112", "00113 |
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| ## A Basic Project management folder structure ## | |
| └─ Root Folder [ Project Title ] | |
| └─ Customer Documents | |
| └─ Management | |
| └─ Contract | |
| └─ Customer Feedback | |
| └─ HR | |
| └─ Proposal | |
| └─ Reports |
| List<Course> GetTop10Courses() | |
| CourseDetail GetCourseDetail(courseID) | |
| List<Course> GetCourses(courseName, limit, offset) |
| List<Course> GetTop10Courses() | |
| CourseDetail GetCourseDetail(courseID) | |
| List<Course> GetCourses(courseName, limit, offset) | |
| void CreateCourse(Course) | |
| void UpdateCourse(Course) |
| function number_to_currency(number, options) { | |
| try { | |
| var options = options || {}; | |
| var precision = options["precision"] || 2; | |
| var unit = options["unit"] || "$"; | |
| var separator = precision > 0 ? options["separator"] || "." : ""; | |
| var delimiter = options["delimiter"] || ","; | |
| var parts = parseFloat(number).toFixed(precision).split('.'); | |
| return unit + number_with_delimiter(parts[0], delimiter) + separator + parts[1].toString(); |
adapted from this blog
# YAML
name: Jon# YAML
object:| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |