Skip to content

Instantly share code, notes, and snippets.

View jaonoctus's full-sized avatar

João Dias jaonoctus

View GitHub Profile
<?php
namespace Tests\Feature;
use App\User;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Http\Response;
@jaonoctus
jaonoctus / settings.json
Last active March 27, 2019 20:05
vscode settings
{
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontLigatures": true,
"editor.fontSize": 21,
"editor.tabSize": 2,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"files.autoSave": "onWindowChange",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
module.exports = {
collection: jest.fn().mockReturnThis(),
where: jest.fn().mockReturnThis(),
limit: jest.fn().mockReturnThis(),
doc: jest.fn().mockReturnThis(),
get: jest.fn().mockResolvedValue({
empty: true,
docs: []
})
}
@jaonoctus
jaonoctus / availableArticles.ts
Last active September 6, 2018 03:07
firestore inequality query workaround
import { firestore } from 'firebase-admin'
import { https, Request, Response } from 'firebase-functions'
import * as express from 'express'
const app = express()
app.get('/:id', async (req: Request, res: Response) => {
const accountId = req.params.id
const articlesQuery = await firestore()
This will definitely break in 2023 (TODO)
You can't see it, but I'm making a very angry face right now
We'll figure it out on Monday
To those I leave behind, good luck!
Somebody set up us the bomb
Become a programmer, they said. It'll be fun, they said.
Give me a break, it's 2am. But it works now.
Ok, 5am, it works. For real.
stopped caring 22 commits ago
project lead is allergic to changes...
@-webkit-keyframes placeHolderShimmer {
0% {
background-position: -468px 0
}
100% {
background-position: 468px 0
}
}
@keyframes placeHolderShimmer {
@jaonoctus
jaonoctus / deleteAllMessagesFromCampusero.js
Last active April 20, 2018 14:59
Delete all messages from campuse.ro (https://campuse.ro/messaging/)
messages = document.getElementsByClassName('row collapse table-body light-theme')
for (i = 0; i < messages.length; i++) {
messageHref = messages[i].children[1].children[0].getAttribute('href')
deleteLink = `https://campuse.ro${messageHref}delete/`
img = document.createElement('img')
img.src = deleteLink
}
{
"workbench.colorTheme": "Slime",
"workbench.statusBar.visible": false,
"explorer.openEditors.visible": 0,
"workbench.startupEditor": "newUntitledFile",
"workbench.activityBar.visible": true,
"git.autofetch": true,
"editor.tabSize": 2,
"editor.fontSize": 21,
"terminal.integrated.fontSize": 21,
xdotool click --delay 5000 --repeat 100000 1
@jaonoctus
jaonoctus / faucetxrb.iim
Last active January 25, 2018 17:19
Run this in looping and profit on https://faucetxrb.com
VERSION BUILD=1001 RECORDER=CR
URL GOTO=https://faucetxrb.com/faucet
FRAME F=1
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
WAIT SECONDS=70