Skip to content

Instantly share code, notes, and snippets.

@Kevin-Kawai
Kevin-Kawai / History|-1032d743|entries.json
Last active July 19, 2022 07:24
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/kevinkawai/Projects/boron-web/src/containers/pages/SectionSettingsNewContentFiles/SectionSettingsNewContentFile.test.tsx","entries":[{"id":"jEUt.tsx","timestamp":1654162896687},{"id":"eTUv.tsx","timestamp":1654162914270},{"id":"ouQA.tsx","timestamp":1654162935144},{"id":"OLUh.tsx","timestamp":1654162959413},{"id":"wPub.tsx","timestamp":1654234568997},{"id":"0vCD.tsx","timestamp":1654237264868},{"id":"75oG.tsx","timestamp":1654237287152},{"id":"SFFV.tsx","timestamp":1654237311202},{"id":"fXTM.tsx","timestamp":1654237321207},{"id":"oodw.tsx","timestamp":1654237336639},{"id":"I3il.tsx","timestamp":1654477493953},{"id":"Yjv4.tsx","timestamp":1654478379904},{"id":"yoGR.tsx","timestamp":1654478410766},{"id":"mQsm.tsx","timestamp":1654478549774},{"id":"Bs9b.tsx","timestamp":1654478938200},{"id":"XEAj.tsx","timestamp":1654479225972},{"id":"JEV6.tsx","source":"Workspace Edit","timestamp":1654479230620},{"id":"wJDY.tsx","timestamp":1654479244474},{"id":"Dupi.tsx","timestamp":16544
@Kevin-Kawai
Kevin-Kawai / approval_service.rb
Last active November 26, 2017 03:38
reading code?
class ApprovalService
def initialize(input_form)
@input_form = input_form
end
def approve
DataStuff.new(input_form)
DataStuff.save!
end
end
@Kevin-Kawai
Kevin-Kawai / .bashrc
Created October 7, 2017 17:20
my bashrc file for vagrant boxs
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@Kevin-Kawai
Kevin-Kawai / .vimrc
Last active October 14, 2017 03:44
my .vimrc
set nocompatible " be iMproved, required
filetype off " required <<========== We can turn it on later
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" " alternatively, pass a path where Vundle should install plugins
" "call vundle#begin('~/some/path/here')
" " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
require 'benchmark'
def it_fibonacci(n)
fib_arr = [0,1]
(2..(n.to_i) - 1).each do |x|
fib_arr << fib_arr[x-1] + fib_arr[x-2]
end
return fib_arr
end
$('.add_activity_btn').click(function(event) {
event.preventDefault();
$('#activity_column').append('<%= j render partial: "routines/partial/empty_activities", locals: {activity: @new_activities, routine: @routines} %>');
$('.new-activity').click(function() {
$(this).parent().parent().remove();
});
});
});
});
<div class="col-8 offset-2">
<%= simple_form_for activity ,url: routine_activities_path(routine) do |f| %>
<%= f.input :name %>
<%= f.input :description %>
<%= f.submit "Submit" %>
<i class="fa fa-times new-activity" aria-hidden="true"></i>
<% end%>
</div>
@Kevin-Kawai
Kevin-Kawai / index.html
Created August 30, 2017 02:42
Flexbox and Bootstrap
<div class="row">
<div class="col-3 offset-2 bootstrap-ex">
<h1 class="text-center">Bootstrap</h1>
</div>
</div>
<div class="flexbox-ex">
<div class="flexbox-ex-inner">
<h1>Flexbox</h1>
</div>
class Bird
attr_accessor :age
def initialize(age)
@age = age
end
def how_old
puts @age
end
end