Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createProduct(price, productNumber, name, description) { | |
return { | |
price: price, | |
code: productNumber, | |
name: name, | |
desc: description | |
} | |
} | |
function discountCreateProduct(price, ...params) { ///tady se jedná o rest parameter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class="[a-zA-Z0-9:;\.\s\(\)\-\,]*" |
This Gist was automatically created by Carbide, a free online programming environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class extends Component { | |
@tracked foo = undefined; | |
@tracked bar = undefined; | |
@action | |
async clickMe() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Android ssl certificate pinning bypass script for various methods | |
by Maurizio Siddu | |
Run with: | |
frida -U -f <APP_ID> -l frida_multiple_unpinning.js [--no-pause] | |
*/ | |
setTimeout(function() { | |
Java.perform(function() { | |
console.log(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { promisify } from 'node:util'; | |
import { exec } from 'node:child_process'; | |
const $ = async (strings, ...values) => { | |
try { | |
return (await promisify(exec)(String.raw({ raw: strings }, ...values))).stdout; | |
} catch { | |
return ''; // yolo | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createWorker(fn) { | |
const url = URL.createObjectURL( | |
new Blob([`\ | |
onmessage = ({ data }) => { | |
const fn = ${fn.toString()}; | |
const result = fn(...JSON.parse(data)); | |
self.postMessage(result); | |
}; | |
`]) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chars = [...'0123456789abcdefghijklmnopqrstuvwxyz']; | |
const charsMap = Object.fromEntries(chars.map((letter, i) => [letter, i])); | |
/** | |
* Function that encodes a string using mulberry32. | |
* @param what What do you want to encode? | |
* @param seed Pick a seed, any seed. | |
* @returns Encoded string. | |
*/ | |
export const encode = (what: string, seed: number) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function importCss(url) { | |
try { | |
return await (new Function(`return import("${url}", { with: { type: "css" } })`))(); | |
} catch { | |
try { | |
return await (new Function(`return import("${url}", { assert: { type: "css" } })`))(); | |
} catch { | |
return fetch(url).then(res => res.text()).then(cssText => { | |
const stylesheet = new CSSStyleSheet(); |
NewerOlder