Skip to content

Instantly share code, notes, and snippets.

View dbasilioesp's full-sized avatar

David Basilio Espitalher dbasilioesp

View GitHub Profile
@dbasilioesp
dbasilioesp / Megamenu.js
Created September 23, 2019 19:02
Megamenu
import Vue from "vue";
export default function () {
new Vue({
el: '.megamenu',
data: function () {
return {
triggers: null,
megamenus: null
@dbasilioesp
dbasilioesp / SelectCustom.js
Created February 6, 2019 17:31
Select Custom
import { forEach } from "./utils/pollyfills";
export default function SelectCustom() {
let selects = document.querySelectorAll(".select-custom");
forEach(selects, selectsSet);
function selectsSet(select) {
@dbasilioesp
dbasilioesp / storybook.md
Last active January 4, 2019 15:05
Storybook Techtalk

https://storybook.js.org/

/* global document */
import { storiesOf } from '@storybook/html';

storiesOf('Demo', module)
  .add('heading', () => '<h1>Hello World</h1>')
  .add('button', () => {
 const button = document.createElement('button');
@dbasilioesp
dbasilioesp / root.scss
Last active October 3, 2018 13:07
Scalable Font Size
html {
font-size: calc(0.6em + 1vw);
}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
int main()
{
int x;
ifstream infile;
infile.open("silly.dat", ios::binary | ios::in)
infile.read(&x, 7); // reads 7 bytes into a cell that is either 2 or 4
}
print "This is my game."
print "You liked the game whit me?"
print "Response yes or no."
quest = raw_input()
if quest == "yes":
print "Okay, let's go the menu."
@dbasilioesp
dbasilioesp / shortcode.php
Last active April 19, 2016 18:32
Shortcode
<?php
// Add Shortcode
function special_title_shortcode( $atts , $content = null ) {
// Attributes
extract( shortcode_atts(
array(
'class' => '',
), $atts )
@dbasilioesp
dbasilioesp / list_post_type.php
Created September 3, 2015 16:25
Listagem de posts do wordpress de forma customizada.
// Shortcode Agenda
function agenda_shortcode() {
//@ini_set('display_errors', 0);
$html = "";
$week = array('segunda', 'terca', 'quarta', 'quinta', 'sexta', 'sabado', 'domingo');
@dbasilioesp
dbasilioesp / spinner-fill.sass
Created December 12, 2014 12:06
Spinner Fill
// <div class="spinner-css">
// <span class="side sp_right">
// <span class="fill"></span>
// </span>
// <span class="side sp_left">
// <span class="fill"></span>
// </span>
// <span class="spinner-css-loading"></span>
// </div>