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
Show hidden characters
{ | |
"jsRules": { | |
"align": false, | |
"arrow-parens": false, | |
"arrow-return-shorthand": false, | |
"ban": false, | |
"ban-comma-operator": false, | |
"binary-expression-operand-order": false, | |
"class-name": false, | |
"comment-format": false, |
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
function getLocalIP() | |
{ | |
var ip = []; | |
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection || false; | |
if (window.RTCPeerConnection) | |
{ | |
var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){}; | |
pc.createDataChannel(''); | |
pc.createOffer(pc.setLocalDescription.bind(pc), noop); |
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
export interface Func<a, b> { | |
f: (_: a) => b | |
then: <c>(this: Func<a, b>, g: Func<b, c>) => Func<a, c> | |
repeat: (this: Func<a, a>) => Func<number, Func<a, a>> | |
repeatUntil: (this: Func<a, a>) => Func<Func<a, boolean>, Func<a, a>> | |
} | |
export let Func = <a, b>(f: (_: a) => b): Func<a, b> => { | |
return { | |
f: f, |
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
<?php | |
function toString($value) { | |
if ($value === TRUE) return 'TRUE'; | |
if ($value === FALSE) return 'FALSE'; | |
if ($value === null) return 'null'; | |
if (is_string($value)) return '"' . $value . '"'; | |
return $value; | |
} |
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
{ | |
"description": "The array of models of the application.", | |
"type": "array", | |
"uniqueItems": true, | |
"items": { | |
"type": "object", | |
"required": [ | |
"name", | |
"attributes", | |
"permissions" |
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 csv | |
import os | |
from os import listdir | |
from os.path import isfile, join | |
from glob import glob | |
from pathlib import Path | |
import shutil | |
import datetime | |
import functools |
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
public interface IList<T> | |
{ | |
public bool isEmpty { get; set; } | |
public IList<T> Add(T v); | |
public U Reduce<U>(Func<T, U, U> f, U init); | |
public IList<U> Map<U>(Func<T, U> f); | |
} | |
public class Node<T> : IList<T> | |
{ |
This file has been truncated, but you can view the full file.
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
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) | |
-- | |
-- Host: 127.0.0.1 Database: My Website | |
-- ------------------------------------------------------ | |
-- Server version 5.7.33 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!50503 SET NAMES utf8 */; |
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 * as React from "react" | |
interface InnerHtmlWrapperProps { | |
text: string | |
className?: string | |
} | |
/** | |
* A component that puts the text inside a div using dangerouslySetInnerHTML to keep the html layout. Inside this component an internal ref is used to keep track of the content inside the div. | |
* When you are working with react you have full control over the DOM and the placement new HTML tags, manipulate attributes and event listeners. However when you deal with HTML encoded content you lose |
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
export interface Page<T> { | |
items: T[] | |
index: number | |
total_pages: number | |
page_size: number | |
current_page: number | |
} | |
export const getPage = <T>(list: T[], page_index: number, page_size: number): Page<T> => { |
OlderNewer