https://github.com/BluePay/BluePay-Sample-Code/tree/master/Ruby
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
| /*Rotation*/ | |
| .box { | |
| animation: rotate 1s ease infinite; | |
| } | |
| @keyframes rotate { | |
| 0% { | |
| -webkit-transform: rotate(0); | |
| transform: rotate(0); | |
| } |
Use Shift to create perfect circle
To duplicate in a circle
- Create a circle,
- Create an object that we want to duplicate
- Set the object center equal to the circle using the crosshair tool
- Use Command+J go to the transform object set the amount of rotation
- Use Command+J for the next objets
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
| import React, {useState} from "react" | |
| export default function() { | |
| const [cont, setCont] = useState("") | |
| const [file, setFile] = useState(null) | |
| const handleSubmit = async (e) => { | |
| e.preventDefault() | |
| const formData = new FormData() | |
| formData.append("body", JSON.stringify(cont)) |
Search content in the history
git grep <regexp> $(git rev-list --all)`
git log -p | grep <pattern>
View history of a folder
git log -- path/to/folder
git log -- path/to/folder/*
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
| class AddUniqueProjectQualification < ActiveRecord::Migration[6.0] | |
| def up | |
| # Stores before removing repeated | |
| sql = <<~SQL | |
| CREATE TEMPORARY TABLE t_project_qualifications AS ( | |
| SELECT project_id, qualification_id | |
| FROM project_qualifications pq | |
| GROUP BY project_id, qualification_id HAVING count(*) > 1 | |
| ) | |
| SQL |
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
| [ | |
| { | |
| "userId": 1, | |
| "id": 1, | |
| "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", | |
| "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" | |
| }, | |
| { | |
| "userId": 1, | |
| "id": 2, |
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
| /** | |
| * Converts an Object to params similar to jQuery.param function | |
| * @param {Object} params | |
| * @param {Array} keys | |
| * @return {String} | |
| */ | |
| function convertObjectToUrl( | |
| params: Record<string, any>, | |
| keys: string[] = [], | |
| isArray: boolean = false |
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
| # Generate alphabet | |
| for n <- ?a..?z, do: n | |
| for n <- ?a..?z, do: << n :: utf8 >> |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 45 columns, instead of 40 in line 2.
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
| id,WellID,SideTrack,WorkType,Slant,APDNumber,APDReceivedDate,APDReturnDate,APDApprovedDate,APDExtDate,APDRescindDate,DrySpud,RotarySpud,WCRCompletionDate,SundryIntentReceivedDate,SundryIntentAcceptedDate,SundryIntentApprovedDate,SundryIntentCancelledDate,SundrySubsequentReceivedDate,SundryCompletionDate,WellStatusReport,WellTypeReport,FirstProdDate,TestDate,ProductionMethod,Choke64th,TubingPressure,CasingPressure,OilRate,GasRate,WaterRate,OilGravity,BTU,Cored,DST,DirSurveyRun,CompletionType,MD,TVD,PBMD,PBTVD,CurrentWellStatus,CurrentWellType,Confidential,doc | |
| 2782,4301330024,0,DRILL,NULL,10002063,NULL,NULL,09/12/1969,NULL,NULL,10/29/1969,NULL,02/15/1970,NULL,NULL,NULL,NULL,NULL,NULL,P,OW,02/18/1970,02/18/1970,Pumping,28,250,225,360,0,0,36.8,NULL,No,Yes,No,NULL,11232,11232,11100,11100,PA,OW,,A | |
| 2786,4301330024,1,REPERF,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10/22/1975,NULL,NULL,NULL,NULL,10/31/1975,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NUL,NULL,NULL,NULL,NULL,N |