Skip to content

Instantly share code, notes, and snippets.

View hasangenc0's full-sized avatar
🦹‍♂️
abracadabra

hasan genc hasangenc0

🦹‍♂️
abracadabra
View GitHub Profile
import fs from 'fs';
import { WebhookClient } from 'discord.js'
const webhookUrl = "DISCORD_WEBHOOK_URL";
const client = new WebhookClient({
url: webhookUrl
});
export async function notify(message, imagePath) {
@hasangenc0
hasangenc0 / Directions_Reduction.ts
Created February 1, 2022 09:27
Directions_Reduction.ts
export function dirReduc(arr: string[]): string[] {
let result = [];
let mtrx: any = {
"NORTH": "SOUTH",
"SOUTH": "NORTH",
"WEST": "EAST",
"EAST": "WEST"
}
for (let val of arr) {
if(result.length > 0 && result[result.length - 1] === mtrx[val]) {
class Node {
value = null;
leftChild = null;
rightChild = null;
constructor(value) {
this.value = value
}
}
<link rel="modulepreload" href="${vendorJsUrl}">
<script type="module" src="${mainJsUrl}"></script>
<script nomodule type="application/javascript" src="${legacyPollyFillJsUrl}"></script>
<script nomodule>System.import(legacyJsUrl)</script>
import externalGlobals from 'rollup-plugin-external-globals';
const externals = {
react: 'React',
'react-dom': 'ReactDOM',
axios: 'axios',
};
export default defineConfig({
...
const externals = {
react: 'React',
'react-dom': 'ReactDOM',
axios: 'axios',
};
export default defineConfig({
...
build: {
rollupOptions: {
table = document.querySelector("table");
sum = 0;
for (var i = 0, row; row = table.rows[i]; i++) {
for (var j = 0, col; col = row.cells[j]; j++) {
if (j ==2 && i > 0) {
sum += Number(col.innerHTML.replaceAll(',', ''));
}
}
}
pkill -f 'java.*cassandra'
table = document.querySelector("table");
sum = 0;
for (var i = 0, row; row = table.rows[i]; i++) {
for (var j = 0, col; col = row.cells[j]; j++) {
if (j ==2 && i > 0) {
sum += Number(col.innerHTML.replaceAll(',', ''));
}
}
}
@hasangenc0
hasangenc0 / asd
Last active February 7, 2021 15:00
Gist bot example
table = document.querySelector("table");
sum = 0;
for (var i = 0, row; row = table.rows[i]; i++) {
for (var j = 0, col; col = row.cells[j]; j++) {
if (j ==2 && i > 0) {
sum += Number(col.innerHTML.replaceAll(',', ''));
}
}
}