Skip to content

Instantly share code, notes, and snippets.

View nicodinh's full-sized avatar
🦥
Last time I said it works? I was kidding. Try me.

Nicolas Azari nicodinh

🦥
Last time I said it works? I was kidding. Try me.
View GitHub Profile
@nicodinh
nicodinh / README.md
Created August 8, 2022 23:45
Jaqen H'ghar : when AI failed

image

C'est a l'epoque de votre arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arriere arrier

@nicodinh
nicodinh / README.md
Created May 7, 2020 21:20
Prison Break S03E08 Bios Screen

prison-break-s03e08-bios-screen

@nicodinh
nicodinh / index.js
Created February 20, 2020 17:32
tailwindcss grid/flex
<div className="grid grid-cols-3 gap-4 mb-4">
<div className="h-64 p-4 shadow rounded bg-white text-center">a</div>
<div className="h-64 p-4 shadow rounded bg-white text-center">a</div>
<div className="h-64 p-4 shadow rounded bg-white text-center">a</div>
</div>
<div className="flex flex-wrap gap-4 mb-4">
<div className="w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/6 mb-4 h-64 shadow rounded bg-white text-center">a</div>
<div className="w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/6 mb-4 bg-gray-400">a</div>
<div className="w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/6 mb-4 bg-gray-500">a</div>
@nicodinh
nicodinh / README.md
Last active August 8, 2022 23:48
Startup S02E04 Javascript writer (java edition)

image

@nicodinh
nicodinh / hasura.js
Created April 17, 2019 15:12
GraphQL Server Hasura
import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory';
import { WebSocketLink } from 'apollo-link-ws'
import { getMainDefinition } from 'apollo-utilities'
import { split } from 'apollo-link';
const cache = new InMemoryCache();
const httpLink = new HttpLink({
uri: process.env.graphqlApi,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const setTemperaturePrefix = 'AA0F'
const temperaturePrefix = 'AA8F'
const batteryPrefix = 'AA8E'
const result = "AA8F6D676566696C55";
const res = result.substr(4, 12);
@nicodinh
nicodinh / index.js
Created March 30, 2019 04:11
binary hex to base 64
//const hexString = '34313832303730313033'
const hexString = 'AA8F0655'
//const base64String = Buffer.from(hexString, 'hex').toString('base64')
const base64String = Buffer.from(hexString, 'binary').toString('base64')
console.log(base64String)
//const base64StringB = 'NDE4MjA3MDEwMw=='
const base64StringB = base64String
//const hexStringB = Buffer.from(base64StringB, 'base64').toString('hex')
const hexStringB = Buffer.from(base64StringB, 'base64').toString()
@nicodinh
nicodinh / start.sh
Created September 2, 2017 07:07
Meteor / Vulcan launcher
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
IPV4="$( hostname -I | sed "s/^ *//;s/ *$//" )"
PORT="3000"
BIND_IP="$IPV4:$PORT"
SETTINGS="$DIR/src/settings.json"
export METEOR_PACKAGE_DIRS="$DIR/app/packages/:$DIR/src/packages/"