Skip to content

Instantly share code, notes, and snippets.

View quantuminformation's full-sized avatar
💭
Podcasting, Firebase, Svelte

Nikos quantuminformation

💭
Podcasting, Firebase, Svelte
View GitHub Profile
@bparadie
bparadie / react-native.d.ts
Last active January 5, 2017 09:11
Incomplete react-native.d.ts, requires react.d.ts from DefinitelyTyped
declare module "react-native" {
import * as React from 'react';
import {ComponentClass, ReactType, ReactNode, ReactElement} from 'react';
export * from 'react';
/**
* Represents the completion of an asynchronous operation
* @see lib.es6.d.ts
import * as React from 'react'
// typeTools.ts
// https://stackoverflow.com/a/46944148
interface Func<T> {
([...args]: any, args2?: any): T // tslint:disable-line
}
export function returnType<T>(func: Func<T>): T {
{
"equipments":
{
"igalumV2": [
{
"history": [
{
"absence": 0,
"hygro": "",
"eclairement": "",
@Couto
Couto / webpack.js
Last active November 11, 2020 17:53
Fetch polyfill with webpack
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
};
//EnhanceJS isIE test idea
//detect IE and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check)
//version arg is for IE version (optional)
//comparison arg supports 'lte', 'gte', etc (optional)
function isIE(version, comparison) {
var cc = 'IE',
b = document.createElement('B'),
@thbkrkr
thbkrkr / Default (Linux).sublime-keymap
Last active August 31, 2022 03:54
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@toolmantim
toolmantim / Makefile
Last active December 5, 2022 23:14
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@Grsmto
Grsmto / react-table.d.ts
Created March 6, 2019 12:59
React Table v7 TS typings definition
// Type definitions for react-table 7
// Project: https://github.com/tannerlinsley/react-table#readme
// Definitions by: Grsmto <https://github.com/grsmto>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
declare module 'react-table' {
export type Cell = {
render: (type: string) => any;
getCellProps: () => any;
column: Column;
@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@jh3y
jh3y / getCursorXY.js
Last active February 26, 2023 23:44
get text cursor position
/**
* returns x, y coordinates for absolute positioning of a span within a given text input
* at a given selection point
* @param {object} input - the input element to obtain coordinates for
* @param {number} selectionPoint - the selection point for the input
*/
const getCursorXY = (input, selectionPoint) => {
const {
offsetLeft: inputX,
offsetTop: inputY,