Skip to content

Instantly share code, notes, and snippets.

View imballinst's full-sized avatar

Try Ajitiono imballinst

View GitHub Profile
@imballinst
imballinst / abuse-scammer-server.mjs
Last active October 12, 2023 07:17
Script to spam and DDoS scammer's server
import axios from 'axios'
// How to use this script:
//
// 0. Create a directory (with any name), then inside that directory, initialize package.json with `npm init -y`, then install axios with `npm install axios`.
// 1. Identify the website that the scammer use. Prefer use desktop browser with private window, just in case.
// 2. Fill out their form (do this with the Network in DevTools open). Don't use real values, just use random values.
// 3. After finding out the request payload (and possibly headers), adjust the below script accordingly.
// 4. Run with `node abuse-scammer-server.mjs` (or whatever the file name is in your local machine).
// 5. See if their server goes down! Usually websites that scammers use don't really have a good DDoS or spam protection, so, yeah.

This is heading with spaces xd

hello world. test link

This is heading with spaces

hello world

This.is.heading.with.periods

const handleSaveRole = async () => {
// ...
if (role.id) {
return api.getRolePermissions(state.jwt, role)
.then(response => api.deleteRolePermissions(state.jwt, response.data.items))
.then(() => api.addRolePermissionsToRole(state.jwt, role, state.roles))
.then(() => {
dispatch(["EDIT_ROLE", role]);
toast.success("Role saved.");
return role;
@imballinst
imballinst / install-docker-compose.sh
Last active February 13, 2019 12:47
Shell scripts to get your VM ready for Google SDK and Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
const renderStudentsScore = (subjects) => {
const arrayOfDivs = [];
Object.keys(subjects).forEach(subjectName => {
const list = subjects[subjectName].map(({ id, name, score }) => (
<li key={`student-id-${id}`}>
{name}: {score}
</li>
));
const renderStudentsScore = (subjects) => {
const { math, physics, chemistry, biology } = subjects;
const mathAverageList = math.map(({ id, name, score }) => (
<li key={`student-id-${id}`}>
{name}: {score}
</li>
));
const physicsAverageList = physics.map(({ id, name, score }) => (
@imballinst
imballinst / AnElement.js
Created December 12, 2017 06:52
React Native with and without StyleSheet
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
const styleObject = { fontSize: 24 };
const styles = StyleSheet({
textStyle: styleObject,
});
const AnElement = () => (
<View>
@imballinst
imballinst / reduce-alternative.js
Last active July 9, 2017 15:37
Alternative to Array.prototype.reduce()
const arr = [1, [2], [3, [[4], [5]]]];
let x = [];
function recurse(arr) {
let dest = [];
if (Array.isArray(arr)) {
arr.forEach(el => {
dest = dest.concat(recurse(el));
});