Skip to content

Instantly share code, notes, and snippets.

View kevinweaver's full-sized avatar
♦️

Kevin Weaver kevinweaver

♦️
View GitHub Profile
@kevinweaver
kevinweaver / gist:54691f2885fbbee6f1c9c167192d5375
Last active August 25, 2023 20:46
regenerate metropolis previews
#!/bin/zsh
# Structure - "full_folder_path:shortened_folder_name:command"
declare -a arr=("2023-06-llama:llama:metro preview --chain-id 1 --optimize --optimizer-runs 0 script/DeployLlama.s.sol"
"art-gobblers:artg:metro preview --chain-id 1 script/deploy/DeployMainnet.s.sol"
"nouns-monorepo/packages/nouns-contracts:nouns:metro preview --chain-id 1 script/DeployDAOV3NewContractsMainnet.s.sol"
"optimism/packages/contracts-bedrock:optimism:source .env && metro preview -vvv --chain-id 1 scripts/Deploy.s.sol"
"bulla-contracts-v2:bulla:metro preview --chain-id 1 script/Deployment.s.sol"
"forge-simple:simple:metro preview --chain-id 1 script/Deploy.s.sol"
"frax-governance:frax:metro preview --chain-id 1 --optimize --optimizer-runs 0 script/test/DeployTestnet.s.sol"
//Essentially, loop something 3 times
var count = 0; //start a counter at 0
var loop = function(){ //create a function called loop();
while(count < 3){ //create a loop that runs until count is no longer less than 3.
console.log("I'm looping"); //print a sentence
count++ //add 1 to your counter
//Your code goes here!
}
};
loop(); //call your loop() function
//Essentially, look through your big text string, find a "C" (first letter of your name).
//Then put that "C" and the next 5 characters (total length of your name) into your hits array.
var text = "Some text here Carmen some more text Carmen"; //Create text string
var myName = "Carmen"; //Create myName string
var hits = []; //Create hits empty array
for (var i = 0; i < text.length; i++){ . // for each letter in your text string
if (text[i] === myName.substring(0,1)) { //if that letter is the same as the first letter in your name
for (var j = i; j < myName.length + i; j++){ //for the number of letters in your name
@kevinweaver
kevinweaver / .rb
Created February 3, 2017 01:40
Plan for the Minx Connection
#1. Minx creates a StyleTileSelection model:
# StyleTyleSelection client_id:integer, shipment_id:integer, name:string, description:string, image_url:string.
# A Client has_many style_tile_selections, a StyleTileSelection belongs_to a Client.
#2. Hellblazer posts a message every time a selection is made.
#3. Minx subscribes to it and uses the following logic:
#If there are no StyleTileSelections for this client
if !client.style_tile_selections.any?
#Create a new one and fill in everything but shipment_id
client.style_tile_selections.create(...)
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
<div id="beer-section">
<div class="beer-column">
<div class="brewery"><strong>Glasstown</strong></div>
<div class="beer">You're Coconuts</div>
<div class="brewery"><strong>Glasstown</strong></div>
<div class="beer">You're Coconuts</div>
<div class="brewery"><strong>Glasstown</strong></div>
<div class="beer">You're Coconuts</div>
</div>
<div class="beer-column">
'use strict';
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
var browserSync = require('browser-sync');
var browserSyncSpa = require('browser-sync-spa');
var util = require('util');
1 - content_for :head do | | |
2 = stylesheet_link_tag "invoice/invoice_form" | | |
3 - content_for :footer_scripts do | | |
4 = javascript_include_tag "invoice/comments"
│09:07:34 kweaver | dtriley4_: so Ive got to objects/models │
│09:07:37 kweaver | responsible party │
│09:07:40 kweaver | insurance policy │
│09:08:09 kweaver | a patient have many responsible partys and a patient can have many insurance carriers │
params.require(:agency_client).permit(:id, :name, :address1, :address2, :city, :state, :zip, :phone, :fax, :logo_url,
agency_client_settings_attributes: [:id, :_destroy, :agency_agency_id, :top_message])