This file contains 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
// Startup | |
brick.showMood(moods.awake); | |
brick.showString("Hello world", 1); | |
music.playSoundEffect(sounds.communicationHello); | |
music.playSoundEffectUntilDone; | |
motors.largeD.run(-50, 3, MoveUnit.Seconds); | |
sensors.touch1.onEvent(ButtonEvent.Pressed, function () { | |
brick.showImage(images.eyesWinking); | |
}) |
This file contains 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 FavoriteReflex < StimulusReflex::Reflex | |
def add_favorite | |
Favorite.create!(user_id: element.dataset[:userid], | |
thing_id: element.dataset[:thingid] | |
) | |
end | |
def remove_favorite | |
favorite = Favorite.find_by(user_id: element.dataset[:userid], | |
thing_id: element.dataset[:thingid]) |
This file contains 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
<div class="flex flex-wrap -mb-4"> | |
<% @things.each do |thing| %> | |
<div class="w-1/3 max-w-sm rounded overflow-hidden shadow-lg"> | |
<div class="px-6 py-4"> | |
<div class="font-bold text-xl mb-2"><%= thing.title %> </div> | |
<p class="text-gray-700 text-base"> | |
ID: <%= thing.id %> | |
</p> | |
<p class="text-gray-700 text-base"> | |
<%= thing.description || "Description TBD" %> |
This file contains 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
<% @requests.each_with_index do |request, index| %> | |
<li class="border-t border-gray-200"> | |
<a href="#" class="block hover:bg-gray-50 focus:outline-none focus:bg-gray-50 transition duration-150 ease-in-out"> | |
<div class="flex items-center px-4 py-4 sm:px-6"> | |
<div class="min-w-0 flex-1 flex items-center"> | |
<div class="flex-shrink-0"> | |
<img class="h-12 w-12 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="" /> | |
</div> | |
<div class="min-w-0 flex-1 px-4 md:grid md:grid-cols-2 md:gap-4"> | |
<div> |
This file contains 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
# Git | |
alias gs="git status" | |
alias gc="git status" | |
alias gl='git pull origin master' | |
alias gplom='git pull origin master' | |
alias gplum='git pull upstream master' | |
alias gpreb='git pull --rebase' | |
alias gpsh='git push' | |
alias gpshom='git push origin master' | |
alias glog='git lg' |
This file contains 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
proposals = Proposal.where(client_data_type:'Ncr::WorkOrder') | |
emails = [] | |
proposals.each {|p| emails << p.approval_steps.first.try(:user).try(:email_address)} | |
emails.uniq |
This file contains 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
def self.ba61_tier1_budget_approver | |
self.with_email_role_slug!( | |
ENV['NCR_BA61_TIER1_BUDGET_MAILBOX'] || 'ba61.communicart.budget.tier1.approver@gmail.com', | |
'BA61_tier1_budget_approver', | |
'ncr' | |
) | |
end | |
def self.ba61_tier2_budget_approver | |
self.with_email_role_slug!( |
This file contains 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
irb(main):054:0> p.public_id | |
=> "FY15-399" | |
irb(main):055:0> p.client_data.created_at = 17.days.from_now | |
=> Thu, 01 Oct 2015 16:18:55 UTC +00:00 | |
irb(main):056:0> p.public_identifier | |
=> "FY16-399" |
This file contains 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized2Bd(Light).tmTheme", | |
"font_face": "Fantasque Sans Mono", | |
"font_size": 16.0, | |
"highlight_line": true, | |
"hot_exit": false, | |
"ignored_packages": | |
[ | |
], | |
"line_padding_top": 3, |
This file contains 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme", | |
"font_face": "Fira Mono", | |
"font_size": 18.0, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
], | |
"line_padding_top": 0, | |
"tab_size": 2, |
NewerOlder