Skip to content

Instantly share code, notes, and snippets.

happy learning

Lucia Lupeipei

happy learning
Block or report user

Report or block Lupeipei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Lupeipei / TodoItem.vue
Last active Apr 25, 2019
nested slot examples.
View TodoItem.vue
<span class="text-muted mr-1">{{ }}.</span> {{ item.title }}
<slot name="after" :item="item" />
export default {
props: [ 'item' ]
Lupeipei / Date.vue
Last active May 11, 2018
new plugin with clear and today for flatpickr
View Date.vue
<flat-pickr v-model="date" :config="configs.selectToday"></flat-pickr>
import flatPickr from 'vue-flatpickr-component'
import SelectTodayPlugin from '../todayselect'
import ConfirmDatePlugin from 'flatpickr/dist/plugins/confirmDate/confirmDate'
Lupeipei / new.html.erb
Last active Apr 14, 2018
View new.html.erb
<script src=""></script>
<%= wechat_config_js debug: false, api: %w(closeWindow) -%>
.disappear {
display: none;
<% unless @user.errors.empty? %>
<div id="error_dialog">
View application.rb
### 修改config/application.rb
require 'rails/all'
# add these line for log4r
require 'log4r'
require 'log4r/yamlconfigurator'
require 'log4r/outputter/datefileoutputter'
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Zurich
class Application < Rails::Application
View gist:0afd68952413b38d4cb0ce927f9f9d66
require 'benchmark'
def binary_search(arr, element)
b = arr.sort
if b.include?(element)
return b.bsearch_index {|x| x >= element}
arr1 ={rand(100)}
You can’t perform that action at this time.