Skip to content

Instantly share code, notes, and snippets.

View davision's full-sized avatar
:octocat:
Vuetifying the web.

David Licen davision

:octocat:
Vuetifying the web.
View GitHub Profile
@zvldz
zvldz / soft_hack.md
Last active May 23, 2024 11:34
soft_hack.md

Soft hack to open telnet

You need gateway 3(mgl03) connected to MiHome. And also ip and gateway token.

1 way (recommended)

Via XiaomiGateway3 component.

You must input in the 'Open Telnet command' field(as it is without changing anything):

{"method":"set_ip_info","params":{"ssid":"\"\"","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}}
@xpepermint
xpepermint / facts.md
Last active April 3, 2018 07:45
0xcert protocol specification

Whitepaper: https://0xcert.org/whitepaper.pdf

Non-fungible Token

  • A unique, one-of-a-kind asset.
  • A digital asset like a collectible, a document or a thing.
  • Follows ERC721 specification.

Xcert

@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active May 4, 2023 06:40
Gradient shadow in pure CSS

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@otobrglez
otobrglez / data.yml
Created March 21, 2018 16:37
Transforming yaml to another yaml.
header:
label: 'Header'
breakpoint:
fallback:
name: header_fallback
label: 'Header @ fallback (306 x 172)'
width: 306
height: 172
small:
name: header_small
@davision
davision / menu--main.html.twig
Last active August 8, 2020 10:50
Custom Drupal main menu which detects Log in link an adds class to it
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul{{ attributes.addClass('menu') }}>
{% else %}
<ul class="menu">
{% endif %}
{% for item in items %}
{%
@davision
davision / hamburger-menu.scss
Last active August 8, 2020 10:54
Simple animated mobile hamburger menu
#hamburger {
color: white;
font-size: 2rem;
width: inherit;
z-index: 501;
.line {
width: 30px;
height: 4px;
background-color: #ecf0f1;
@davision
davision / theme_preprocess.php
Last active December 15, 2021 00:21
How to get URL from Media entity field inside a paragraph in Drupal 8
<?php
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Url;
use Drupal\media\Entity\Media;
use Drupal\Core\Site\Settings;
use Drupal\file\Entity\File;
/**
* Preprocess functions for background iamge in Tagline paragraph
@davision
davision / vue2-countdown.vue
Last active May 3, 2024 13:22
Simple countdown component for VueJS 2
<template lang="html">
<div v-if="isEnded">
Ended.
</div>
<div v-else>
<div>Days: {{ days }}</div>
<div>Hours: {{ hours }}</div>
<div>Minutes: {{ minutes }}</div>
<div>Seconds: {{ seconds }}</div>
@kieranmv95
kieranmv95 / _spacing-helper.scss
Last active February 6, 2019 02:10
Generates a array of spacing helper classes for margin and padding
// Customisable spacing units. these can be changed and new ones added
$spacing-units: (
1: 3px,
2: 5px,
3: 8px,
4: 13px,
5: 21px,
);
// These will not change this is just to help generate the classes with the correct naming
@yann-yinn
yann-yinn / nuxt-js-and-gsheet-example.vue
Last active August 27, 2018 19:00
Nuxt.js vue component to display datas from a google spreadsheet (with google api V4 without oAuth )
<template>
<div id="homepage">
<h1>Les dernières Articles</h1>
<div class="article" v-for="article in articles">
<h2> {{ article.title }} </h2>
<p> {{ article.content }} </p>
</div>
</div>
</template>