- Adds optional static types in JavaScript.
- Makes the code more expressive.
- Makes it easier to catch bugs in production.
- Can translate to various ecmaScript version.
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
------------------------------------------------------------------ | |
-- NAME: utils.lua | |
-- AUTHOR: Aadvik<[email protected]> | |
-- DESCRIPTION: A simple utils file. | |
-- LICENCE: GNU Public license | |
------------------------------------------------------------------ | |
function table.indexOf(tab, elem) | |
for i,v in pairs(tab) do | |
if v == elem then |
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
/* | |
* File: gulpfile.js | |
* Author: Aadvik<[email protected]> | |
* Description: A simple gulp based js and sass setup with browser reload | |
* Source: https://gist.github.com/Aadv1k/b5b67161877357fbf5992dd34f0e7143 | |
* License: GNU Public licence | |
* Build: `npm init -y && npm install -D gulp gulp-cli uglify gulp-uglify sass gulp-sass browser-sync` | |
*/ | |
const gulp = require("gulp"); |
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
syntax on | |
if has("gui_running") | |
set guifont=Iosevka\ Curly:h12 | |
set guioptions-=m | |
set guioptions-=T | |
set guioptions-=r | |
endif |
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 url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;700&display=swap'); | |
:root { | |
--main-bg-1: rgb(60,56,54); | |
--main-bg-2: rgb(40,40,40); | |
--main-bg-3: rgb(29,32,33); | |
--main-fg-1: #fbf1c7; | |
--main-fg-2: #ebdbb2; | |
--main-fg-3: #d5c4a1; |
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
set guifont=consolas:h12 | |
set termguicolors | |
set guioptions-=m " menu bar | |
set guioptions-=T " tool bar | |
set guioptions-=r " scroll bar | |
syntax on | |
set noerrorbells |
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
#!/usr/bin/env node | |
/* | |
* Author: Aadv1k<[email protected]> | |
* License: GNU Public License | |
* Source: https://gist.github.com/Aadv1k/bfa9f874345c6204e4871e66b2f6d99b | |
* Install: npx https://gist.github.com/Aadv1k/bfa9f874345c6204e4871e66b2f6d99b | |
*/ | |
const axios = require("axios"); | |
const cheerio = require("cheerio"); | |
const { writeFileSync, existsSync, mkdirSync } = require("fs"); |
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
#!/bin/bash | |
## CONFIG | |
HISTSIZE=5000 | |
HISTFILESIZE=5000 | |
set -o vi | |
## ALIASES |
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
;; Package --- Summary: Functional, but simple evil emacs config. | |
;; Author: Aadvik <[email protected]> | |
;; License: Public Domain | |
;; URL: https://gist.github.com/Aadv1k/2bd92889f3a10a5ffb6298b8fb7d04bf | |
(defvar *HOME* "C:/Users/Aadv1k") | |
(setq default-directory *HOME*) | |
(setq-default default-directory *HOME*) |
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
const fs = require('fs'); | |
const https = require('https'); | |
function downloadImage(url, destinationPath) { | |
if (!url) { | |
console.error('Error: URL is empty.'); | |
return; | |
} | |
https.get(url, (response) => { |
OlderNewer