Skip to content

Instantly share code, notes, and snippets.

View B3nnyL's full-sized avatar
🏵️
Building Subrosa

B3nnyL

🏵️
Building Subrosa
View GitHub Profile
https://www.dropbox.com/s/q689vd0zs4qd0ef/io_v14.1..rar?dl=0
var timer = Timer ()
var count = 10
# completion
timer = Timer.scheduledTimer(withTimeInterval: 1.0,
repeats: true) { theTimer in
self.count -= 1
print(self.count)
if self.count == 0 {
print("Counter = 0. theTimer = \(theTimer)")
theTimer.invalidate()
//Click monster
var button = document.querySelector('button');
Rx.Observable.fromEvent(button, 'click')
.scan(count => count + 1, 0)
.subscribe(count => console.log(`Clicked ${count} times`));
<template>
<div class="feature-grid">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-12 col-12" >
<feature-block :feature="feature" v-on:add-cents="onAddCent($event, feature)"></feature-block>
</div>
</div>
</div>
</div>
@B3nnyL
B3nnyL / StorybookVueProjectSetup .md
Last active October 21, 2018 20:58
A simple how-to guide for setting up Storybook+Vue project via StorybookCLI and VueCLI3
  • Step 1: Initiate a Vue project with Vue CLI 3
  • Step 2: Install @storybook/cli@4.0.0-alpha.24 globally: npm i -g @storybook/cli@4.0.0-alpha.24
  • Step 3: Add Storybook to Vue project via storybook CLI: getStorybook
  • Step 4: Update @storybook/vue to 4.0.0-alpha.24: npm i @storybook/vue@^4.0.0-alpha.24
  • Step 5: Install babel-preset-vue as devDependency: npm i -save-dev babel-preset-vue
  • Start storybook and happy storybook time:
@B3nnyL
B3nnyL / hello_world.rb
Created October 18, 2018 06:09
Hello World Examples
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def sayHi
puts "Hello !"
end
end
hello = HelloWorld.new("World")
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def sayHi
puts "Hello !"
end
end
hello = HelloWorld.new("World")
@B3nnyL
B3nnyL / scrollbar-style.css
Created December 1, 2018 10:08
Scrollbar-style
::-webkit-scrollbar-thumb {
border: none;
-webkit-box-shadow: none;
box-shadow: none;
background: aqua;
-webkit-border-radius: 4px;
border-radius: 4px;
min-height: 40px;
}
@B3nnyL
B3nnyL / a-hitchhiker-guide-on-hyperjs-theme.md
Last active December 7, 2022 09:28
A hitchhiker guide on hyper.js theme

Prerequisite

  • An editor (eg. vscode, vim)
  • A mac where Hyper.js installed (for windows and linux users, you can also follow this guide, but please find your hyper configuration code location from our website)
  • Chrome (which will be very helpful on inspection and experiments)

Some background knowledge...

Hyper.js is a terminal built with Electron, empowered by React, Redux and XTerm.js. It's fast, sleek and flexible. Everyone can simply customise its interface with css and add some playfulness by writing few lines of javascript codes. Hyper.js also has a detailed API reference which you may find helpful for advancing customisation.