hello world. test link
hello world
| 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. |
hello world. test link
hello world
| 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; |
| 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 }) => ( |
| import React from 'react'; | |
| import { View, Text, StyleSheet } from 'react-native'; | |
| const styleObject = { fontSize: 24 }; | |
| const styles = StyleSheet({ | |
| textStyle: styleObject, | |
| }); | |
| const AnElement = () => ( | |
| <View> |
| 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)); | |
| }); |