Skip to content

Instantly share code, notes, and snippets.

:octocat:
Ready to code.

Emmanuel Salomon ManUtopiK

:octocat:
Ready to code.
Block or report user

Report or block ManUtopiK

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
@ManUtopiK
ManUtopiK / clean-graphql.js
Last active Jul 11, 2019
Clean graphql response : Remove edges, node and __typename from graphql response
View clean-graphql.js
/**
* Remove edges, node and __typename from graphql response
*
* @param {*} Object the graphql response
* @returns Object Clean graphql response
*/
const cleanGraphQLResponse = function(input) {
if (!input) return null
const output = {}
const isObject = obj => {
@ManUtopiK
ManUtopiK / fetchData.vue
Created Apr 5, 2018
Vue fetch component
View fetchData.vue
<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>
@ManUtopiK
ManUtopiK / header.vue
Last active Dec 10, 2017
Brightness reverted color computed. Vue component.
View header.vue
<template>
<div class="header" :style="style">
</div>
</template>
<script>
export default {
name: 'Header',
props: {
@ManUtopiK
ManUtopiK / style.css
Created Oct 4, 2017
CSS collapsible block
View style.css
.wrap-collabsible {
margin-bottom: 1.2rem 0;
}
input[type='checkbox'] {
display: none;
}
.lbl-toggle {
display: block;
View gist:2b3991914c237ac98a8ff91a9cf9af3e
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)
@ManUtopiK
ManUtopiK / gist:bc5d1b2e5a1d8f32284d23a7b3512f38
Last active Apr 25, 2017
Hack to detect if chrome devtools is open
View gist:bc5d1b2e5a1d8f32284d23a7b3512f38
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.............................................................................................................");
}
});
@ManUtopiK
ManUtopiK / index.html
Last active Nov 3, 2016
Glitch Effect
View index.html
<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>
@ManUtopiK
ManUtopiK / manu-vivaldi.css
Created Sep 11, 2016
My vivaldi custom theme
View manu-vivaldi.css
/**
* Import webfont icons from font awesome
*/
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
/**
* #header
*/
@ManUtopiK
ManUtopiK / broken-image.css
Last active Sep 10, 2016
Beautiful placeholder for broken image
View broken-image.css
/* Adding Helpful Information */
img {
font-family: 'Helvetica';
font-weight: 300;
line-height: 2;
text-align: center;
width: 100%;
height: auto;
You can’t perform that action at this time.