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
| function extractFormOptionsData() { | |
| let rows = document.querySelectorAll('.form-options-item'); | |
| let data = {}; | |
| rows.forEach(row => { | |
| let cells = row.getElementsByTagName('td'); | |
| if (cells.length >= 2) { | |
| let key = cells[0].textContent.trim(); | |
| let value = cells[1].textContent.trim().replace(/"/g, '').trim(); | |
| data[key] = parseInt(value, 10); |
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 'tailwindcss/base'; | |
| @import 'tailwindcss/components'; | |
| @import 'tailwindcss/utilities'; |
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
| Install-Module oh-my-posh -Scope CurrentUser | |
| Get-PoshThemes | |
| if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) { | |
| New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force | |
| } |
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 HtmlWebPackPlugin = require('html-webpack-plugin'); | |
| const MiniCSSExtractlugin = require('mini-css-extract-plugin'); | |
| module.exports = { | |
| module: { | |
| rules: [ | |
| { | |
| test: /\.js$/, | |
| exclude: /node-modules/, | |
| use: { |
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 abc = [[0,1,2],[0,1],[0],[0,1,2]]; | |
| function countIndex(a, k) { | |
| if (a === 0 && k === 0) { | |
| return 0; | |
| } else if (k !== 0) { | |
| return this.countIndex(a, k-1) + 1; | |
| } else { | |
| const totalItem = abc[a-1].length; |
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
| source /usr/share/powerline/bindings/tmux/powerline.conf | |
| set -g mouse on | |
| # remap prefix from 'C-b' to 'C-a' | |
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| # split panes using | and - | |
| bind / split-window -h |
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
| //lsauer.com , lo sauer 2013 | |
| //JavaScript List of selected MIME types | |
| //A comprehensive MIME List is available here: https://gist.github.com/lsauer/2838503 | |
| var mimeTypes = | |
| { | |
| 'a' : 'application/octet-stream', | |
| 'ai' : 'application/postscript', | |
| 'aif' : 'audio/x-aiff', | |
| 'aifc' : 'audio/x-aiff', | |
| 'aiff' : 'audio/x-aiff', |
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
| def factorial(n: Int): Int = { | |
| def loop(acc: Int, n: Int): Int = | |
| if (n == 0) acc | |
| else loop(acc * n, n-1) | |
| loop(1, n) | |
| } | |
| factorial(5) | |
| def sum(f: Int => Int, a: Int, b: Int): Int = { |
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
| [ | |
| { | |
| "currency": "Albania Lek", | |
| "abbreviation": "ALL", | |
| "symbol": "Lek" | |
| }, | |
| { | |
| "currency": "Afghanistan Afghani", | |
| "abbreviation": "AFN", | |
| "symbol": "؋" |
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
| void main() { | |
| var deck = new Deck(); | |
| // print(deck.cardsWithSuits('Diamonds')); | |
| deck.removeCard('Diamonds', 'Ace'); | |
| print(deck); | |
| // deck.shuffle(); | |
| // print(deck.deal(5)); | |
| // print(deck); | |
| } |
NewerOlder