This file contains hidden or 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
//https://stackoverflow.com/a/60041791/2460773 | |
//https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums | |
export const mapConsumptionActiveMapType = { | |
elevation: "map", | |
orthomosaic: "elevation", | |
model_3d: "3d model", | |
} as const; | |
export type MapConsumptionActiveMapType = keyof typeof mapConsumptionActiveMapType; |
This file contains hidden or 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"; | |
import { useState, useMemo, Dispatch, SetStateAction } from "react"; | |
type IContext<T> = [T, Dispatch<SetStateAction<T>>]; | |
type ProviderProps<T> = { initialValue: T; children: React.ReactNode }; | |
export function makeStore<T>(): [ | |
(props: ProviderProps<T>) => React.ReactElement, | |
() => IContext<T> | |
] { | |
// Make a context for the store | |
const context = React.createContext<IContext<T>>(null); |
This file contains hidden or 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or 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
@mixin equilateral-triangle($direction, $size, $color) { | |
width: 0; | |
height: 0; | |
@if $direction == 'up' { | |
border-left: em($size) solid transparent; | |
border-right: em($size) solid transparent; | |
border-bottom: em($size) solid $color; | |
} | |
@else if $direction == 'down' { | |
border-left: em($size) solid transparent; |
This file contains hidden or 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
const fs = require('fs'); | |
const path = require('path'); | |
const allFilesSync = (dir, fileList = [], prefix = '') => { | |
fs.readdirSync(dir).forEach(file => { | |
const filePath = path.join(dir, file) | |
fileList.push( | |
fs.statSync(filePath).isDirectory() | |
? {file: allFilesSync(filePath, undefined, file)} |
This file contains hidden or 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 array = ["[email protected]", "[email protected]"]; | |
const emails = () => array; | |
module.exports = emails; |
This file contains hidden or 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
Ensure you have the necessary prerequisites installed: | |
sudo apt-get install linux-headers-generic build-essential dkms | |
Clone this repository: | |
git clone https://github.com/pvaret/rtl8192cu-fixes.git | |
Set it up as a DKMS module: | |
sudo dkms add ./rtl8192cu-fixes | |
Build and install it: |
This file contains hidden or 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
sudo apt-get update && sudo apt-get upgrade | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
sudo apt-get update | |
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" | |
sudo apt-get update | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo add-apt-repository ppa:olivier-berten/misc |
This file contains hidden or 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="cobalt2" | |
ZSH_THEME="robbyrussell" | |
#ZSH_THEME="af-magic" |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install -y guake git curl g++ zsh vim build-essentia | |
//---------------------zsh guake etc.. | |
--------------------------------------------------------------------------------- | |
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh | |
sudo chsh -s $(which zsh) $USER | |
git clone https://github.com/rupa/z.git ~/z | |
curl -L "https://raw.githubusercontent.com/NitsanBaleli/Linux-env/master/zsh/.zshrc" > ~/.zshrc |