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 { faker } from "@faker-js/faker"; | |
import fs from "fs"; | |
const args = process.argv.slice(2); | |
const [count] = args; | |
if (!count) { | |
console.error("Please provide a count as an argument"); | |
process.exit(1); | |
} |
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 BufferFactory from "./BufferFactory"; | |
import AsyncStorage from "@react-native-community/async-storage"; | |
describe("BufferFactory", () => { | |
beforeEach(async () => { | |
await AsyncStorage.clear() | |
}) | |
it("should add items to the buffer", () => { | |
const buffer = BufferFactory(2); |
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 axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const cron = require('node-cron'); | |
const productPage = | |
'https://www.cyberpuerta.mx/Computo-Hardware/Monitores/Monitores/Monitor-Gamer-Curvo-ASUS-ROG-Strix-XG35VQ-LED-35-Quad-HD-Ultra-Wide-FreeSync-100Hz-HDMI-Negro-Gris-Rojo.html?nosto=shop_api_home0_1'; | |
const selector = '.priceText'; | |
const desiredPrice = 15000; | |
async function getHTML(url) { |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/Hugo/.oh-my-zsh | |
# add z | |
. /usr/local/etc/profile.d/z.sh | |
# Set name of the theme to load. Optionally, if you set this to "random" |
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 myFunction() { | |
var d = new Date(); | |
var hours = d.getHours(); | |
var currentTime = d.toLocaleDateString(); | |
var counter = SpreadsheetApp.getActiveSheet().getRange('B1').getValues(); | |
if (hours >= 6 && hours <= 18) { | |
var response = UrlFetchApp.fetch("your_heroku_app_address"); | |
SpreadsheetApp.getActiveSheet().getRange('S' + counter).setValue('Visted at ' + currentTime + ' ' + hours + 'h'); | |
SpreadsheetApp.getActiveSheet().getRange('B1').setValue(Number(counter) + 1); |
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
let price = "$2,199.23" | |
const number = Number(price.replace(/[^0-9.-]+/g,"")); | |
console.log(number) //2199.23 |
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
git log --oneline | |
// Count the number of commits to squash, ex. 4 | |
git rebase -i HEAD~4 | |
pick 643km12 A | |
f 34kldf9 B | |
f jdsklss C | |
f ax23dx3 D |