This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Import webfont icons from font awesome | |
*/ | |
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css); | |
/** | |
* #header | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section id="intro-frame"> | |
<div id="call2action"> | |
<div class="game-title"> | |
<span>Can You</span><br> | |
<div class="align-box"> | |
<span class="emphasized glitch" data-text="hack"> | |
Hack | |
</span> | |
<span class="small">the</span><br> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var checkStatus; | |
var element = new Image(); | |
// var element = document.createElement('any'); | |
Object.defineProperty(element, 'id', { | |
get:function() { | |
checkStatus='on'; | |
throw new Error("This is a hack to check If chrome Devtools is open. Pay no attention............................................................................................................."); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Csv() | |
Dim Fichier As Variant, Chaine As String, T(), LDéb As Long, TSpl() As String, L As Long, C As Long, Z As String | |
ReDim T(1 To 5000, 1 To 9) | |
LDéb = 2 | |
ChDrive ThisWorkbook.Path: ChDir ThisWorkbook.Path | |
Fichier = Application.GetOpenFilename("Fichier CSV (*.csv), *.csv") | |
If VarType(Fichier) <> vbString Then Exit Sub | |
Open Fichier For Input As #1 | |
Line Input #1, Chaine ' ignore la ligne de titres du csv | |
Do While Not EOF(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrap-collabsible { | |
margin-bottom: 1.2rem 0; | |
} | |
input[type='checkbox'] { | |
display: none; | |
} | |
.lbl-toggle { | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="header" :style="style"> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'Header', | |
props: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app" class="min-h-screen font-sans bg-grey-lighter"> | |
<div class="container mx-auto max-w-md p-6"> | |
<fetch-data url="https://api.github.com/orgs/vuejs/repos"> | |
<div slot="loading">Loading repositories...</div> | |
<div slot-scope="{ response: repos }"> | |
<div v-for="repo in repos" class="shadow-md bg-white p-6 mb-6 rounded"> | |
<div class="flex mb-4"> | |
<a :href="repo.html_url" class="text-blue no-underline"><h2 class="text-lg mr-4">{{ repo.full_name }}</h2></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove edges, node and __typename from graphql response | |
* | |
* @param {Object} input - The graphql response | |
* @returns {Object} Clean graphql response | |
*/ | |
const cleanGraphQLResponse = function(input) { | |
if (!input) return null | |
const output = {} | |
const isObject = obj => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import forEach from 'lodash/forEach' | |
const icons = require.context('~/icons', false, /[A-Z]\w+\.(svg)$/) | |
forEach(icons.keys(), (fileName) => { | |
const iconConfig = icons(fileName) | |
const iconName = fileName.split('/').pop().split('.')[0] | |
Vue.component(iconName, iconConfig.default || iconConfig) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function* rateLimit(limit, time) { | |
let count = 0; | |
while(true) { | |
if(count++ >= limit) { | |
await delay(time); | |
count = 0; | |
} | |
yield; // Let's execute next code | |
} | |
} |