Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / js_linked_list.js
Last active May 5, 2024 05:37
JS Linked List Class
// Construct Single Node
class Node {
constructor(data, next = null) {
this.data = data;
this.next = next;
}
}
// Create/Get/Remove Nodes From Linked List
class LinkedList {
@Drallas
Drallas / High Available Pi-hole failover cluster using Keepalived and Orbital Sync.md
Last active May 5, 2024 05:36
High Available Pi-hole failover cluster using Keepalived and Orbital Sync
@mlafeldt
mlafeldt / elf.h
Last active May 5, 2024 05:35
elf.h for OSX
/* This is the original elf.h file from the GNU C Library; I only removed
the inclusion of feature.h and added definitions of __BEGIN_DECLS and
__END_DECLS as documented in
https://cmd.inp.nsk.su/old/cmd2/manuals/gnudocs/gnudocs/libtool/libtool_36.html
On macOS, simply copy the file to /usr/local/include/.
Mathias Lafeldt <mathias.lafeldt@gmail.com> */
/* This file defines standard ELF types, structures, and macros.
@chrisidakwo
chrisidakwo / nigerian-states.json
Last active May 5, 2024 05:33
All 36 states in Nigeria, and their local government areas - including the Federal Capital Territory and its area councils
{
"Abia": [
"Aba North",
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala-Ngwa North",
"Isiala-Ngwa South",
"Isuikwato",
@sebastiandero
sebastiandero / 1v1.cfg
Created March 8, 2017 15:24
1v1 config for CSGO
bot_kick;
exec gamemode_competitive;
mp_free_armor 1;
mp_freezetime 3;
mp_weapons_allow_map_placed 1;
mp_humanteam any;
mp_restartgame 1;
mp_round_restart_delay 3;
mp_roundtime 80250;
mp_maxrounds 30;
@dvddarias
dvddarias / Arrows2DMovement.cs
Last active May 5, 2024 05:32
Unity editor script to precisely move, rotate and scale GameObjects on a 2D scene, using the arrow keys.
/*
Unity editor script to precisely move, rotate and scale GameObjects on 2D scenes, using the arrow keys.
Notes:
- To use it just include it on an "Assets/Editor" folder on your project.
- The action depends on the selected tool and the size of the movement depends on the Scene view zoom.
- The more "zoomed in" is the scene view the smaller is the movement step.
- It will work when the current Scene tab is in 2D mode and there is at least one gameObject selected,
otherwise the scene camera will move as usual :)
@NoCtrlZ1110
NoCtrlZ1110 / SoChiTieu.gs
Last active May 5, 2024 05:31
Telegram to Google Sheet || Subscribe to my channel: https://bit.ly/van-huy-dev-youtube
// Constants
const TOKEN = `<YourTokenHere>`;
const BASE_URL = `https://api.telegram.org/bot${TOKEN}`;
const CHAT_ID = '<ChatId>';
const DEPLOYED_URL = '<YourScriptDeployedURL>';
const SUM_CELL = 'G2';
const METHODS = {
SEND_MESSAGE: 'sendMessage',
SET_WEBHOOK: 'setWebhook',
// This is a basic uniswap frontrunning MEV bot
// Made by Merunas follow me on youtube to see how to use it and edit it: https://www.youtube.com/channel/UCJInIwgW1duAEnMHHxDK7XQ
// 1. Setup ethers, required variables, contracts and start function
const { Wallet, ethers } = require('ethers')
const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle')
// 1.1 Setup ABIs and Bytecodes
const UniswapAbi = [{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesire
@javiermon
javiermon / LICENSE
Last active May 5, 2024 05:15
get default gateway
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
@realrashid
realrashid / Install PHP-CS-Fixer.md
Last active May 5, 2024 05:14
How to Install PHP-CS-Fixer on Windows

Installing PHP-CS-Fixer for VsCode on Windows

Install PHP-CS-FIXER Using Composer

composer global require friendsofphp/php-cs-fixer

after successfully installation of PHP-CS-FIXER

now install PHP-CS-FIXER VSCODE Extension