Skip to content

Instantly share code, notes, and snippets.

View deadcoder0904's full-sized avatar
:octocat:
Dead

akshay kadam (a2k) deadcoder0904

:octocat:
Dead
View GitHub Profile
@deadcoder0904
deadcoder0904 / affiliate.server.ts
Created March 27, 2024 05:04
Affiliate/Referral Management System with MLM support
import { relations, sql } from "drizzle-orm"
import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core"
import { ulid } from "ulidx"
export const affiliatesTable = sqliteTable(
"affiliate",
{
id: text("id")
.primaryKey()
.$defaultFn(() => ulid()),
// Add script in console.
// var _cScript = document.createElement('script');_cScript.src='../../../tools/custom.js';document.head.appendChild(_cScript);
// ==================================================
function sequenceClass() {
this.init = function () {
var tClass = document.getElementsByClassName('t');
for (var i = 0; i < tClass.length; i++) {
tClass[i].style.boxShadow = '0px 0px 10px 2px #000000';
tClass[i].setAttribute('aria-hidden', 'true');
tClass[i].onclick = mouseEvent;
@deadcoder0904
deadcoder0904 / README.md
Last active April 5, 2019 06:25
Automate boring tasks with DOM Testing Library by Kent C Dodds

Automate boring tasks with DOM Testing Library by Kent C Dodds

Watch the video for which tasks to automate

@deadcoder0904
deadcoder0904 / App.js
Created January 12, 2019 06:17
React Native Simple Form
class Form extends React.Component {
constructor(props) {
super(props);
this.state = {
name: "",
email: "",
};
}
_storeInput = (key, value) => {
@deadcoder0904
deadcoder0904 / hack.js
Created February 12, 2018 20:14
Unfollow everyone on Github
[...document.querySelectorAll('.btn.btn-sm.js-toggler-target')].map(a => a.click())
@deadcoder0904
deadcoder0904 / app.js
Last active October 27, 2017 12:33
Get Country Codes & Flags of Countires w.r.t Country Codes
// Get country codes & flag of countries with respect to country codes
const fetch = require("node-fetch");
const NEW_LINES = `\n\n`;
const EMOJIS = `${NEW_LINES}😀 😃 😄 😁 😆 😅 😂 🤣 ☺️ 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😜 😝 😛 🤑 🤗 🤓 😎 🤡 🤠 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣 😖 😫 😩 😤 😠 😡 😶 😐 😑 😯 😦 😧 😮 😲 😵 😳 😱 😨 😰 😢 😥 🤤 😭 😓 😪 😴 🙄 🤔 🤥 😬 🤐 🤢 🤧 😷 🤒 🤕 😈 👿 👹 👺 💩 👻 💀 ☠️ 👽 👾 🤖 🎃 😺 😸 😹 😻 😼${NEW_LINES}`;
const FIXER_URI = "https://api.fixer.io/latest";
const REST_COUNTRIES_URI = "https://restcountries.eu/rest/v2/alpha/";
const COUNTRY_URI = "http://country.io/currency.json";
let currencyCodes = [];
let currencyOfCountry = [];
const flagsWithCurrencies = {};
@deadcoder0904
deadcoder0904 / allThemes.json
Last active April 14, 2021 01:35
Color Names for Theme with RGB values
[
{
"name": "Air Force blue",
"value": "#5d8aa8"
},
{
"name": "Alice blue",
"value": "#f0f8ff"
},
{
@deadcoder0904
deadcoder0904 / eslintrc.md
Last active October 14, 2017 09:51
ESLINT CONFIG

Step 1 : Install eslint & babel-eslint

yarn add eslint babel-eslint -D

Step 2 : Start setup

./node_modules/.bin/eslint --init

Step 3 : Add the following to .eslintrc.json

@deadcoder0904
deadcoder0904 / keywords.js
Created July 12, 2017 10:42
Keywords Everywhere get only keywords in an array format
var sorting = document.querySelectorAll('td');
var keywords = [];
sorting.forEach((keyword, i) => {
if((i - 1) % 8 === 0) keywords.push(keyword.innerHTML);
});
console.log(JSON.stringify(keywords, null, 2));