Skip to content

Instantly share code, notes, and snippets.

View icetbr's full-sized avatar

icetbr

View GitHub Profile
@icetbr
icetbr / gist:c42378cc8ecb244abe1980ab04ffcab4
Created April 3, 2024 00:49
Fixed shopee advanced search
// ==UserScript==
// @name Shopee Advanced Search
// @description Filter search results containing ALL specified words, supporting word exclusion and minimum sold.
// @version 1.1.2
// @author icetbr
// @icon https://www.google.com/s2/favicons?sz=64&domain=shopee.com.br
// @include https://shopee.*/*
// @license MIT
// @namespace https://github.com/icetbr/userscripts
// @updateURL https://openuserjs.org/meta/icetbr/Shopee_Advanced_Search.meta.js
setgs iHoursToRespawncell 240000
setgs iHoursToRespawncellCleared 240000
class Period {
constructor(year, month) {
this.year = year;
this.month = month;
}
next() {
return this.month + 1 > 11
? new Period(this.year + 1, 0)
: new Period(this.year, this.month + 1)
const db = require('./db');
const server = require('./server');
const sinon = require('sinon');
test('POST /employees transforms the employee data to the legacy format, adds metadata, saves it to the database, saves a copy for history and returns the non transformed employee', async () => {
// given our current time
const now = new Date('2018-02-21T12:30:20.903Z');
const clock = sinon.useFakeTimers({ now, toFake: ['Date']});
// and a fresh database
@icetbr
icetbr / test.js
Last active August 24, 2020 00:07
testing gist run
console.log('test')

EDIT from 2019: Hi folks. I wrote this gist for myself and some friends, and it seems like it's gotten posted somewhere that's generated some (ahem, heated) discussion. The whitespace was correct when it was posted, and since then GitHub changed how it formats <pre> tags. Look at the raw text if you care about this. I'm sure someone could tell me how to fix it, but (thank you @anzdaddy for suggesting a formatting workaround) honestly this is a random throwaway gist from 2015, and someone more knowledgable about this comparison should just write a proper blog post about it. If you comment here I'll hopefully see it and stick a link to it up here. Cheers. @oconnor663

Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?

title = "TOML Example"
 
{"total":2,"success":2,"data":[{"daysInfos":[{"dia":"2018-08-26","escala":{"pos":2,"dia":"2018-06-01","ini":0},"jornada":1,"punches":[],"dayRange":{"start":1535284800,"startInfo":"2018-08-26 12:00","end":1535371200,"endInfo":"2018-08-27 12:00"},"leaves":[],"periods":{"intinere":[],"shifts":[{"start":1535284800,"startInfo":"2018-08-26 12:00","end":1535371200,"endInfo":"2018-08-27 12:00","type":["shift"],"options":{"shift":{"DESC_TIPO_HORA":"BH 1.1"}}}],"leaves":[],"tolerance":[],"punches":[],"nightly":[{"start":1535320800,"startInfo":"2018-08-26 22:00","end":1535346000,"endInfo":"2018-08-27 05:00","type":["nightly"],"options":{}}]},"punchesInTolerance":[],"timeline":[{"start":1535284800,"startInfo":"2018-08-26 12:00","end":1535320800,"endInfo":"2018-08-26 22:00","type":["shift"],"options":{"shift":{"DESC_TIPO_HORA":"BH 1.1"}}},{"start":1535320800,"startInfo":"2018-08-26 22:00","end":1535346000,"endInfo":"2018-08-27 05:00","type":["shift","nightly"],"options":{"shift":{"DESC_TIPO_HORA":"BH 1.1"}}},{"start":1535
Existem 2 categorias de rinite: alérgica e não alérgica
- Alérgica: pólen, animais
- Não alérgica: fumaça, frio, mudança de temperatura
RINITE NÃO ALÉRGICA
Usar em ordem do mais fraco p/ mais forte, todos SPRAY!
1) Evitar o frio! Se agasalhar bem, evitar correntes de vento fria
2) Anti histaminicos: Azelastina (parece mais popular), Olopatadina
3) Glucocorticoide: budesonida (ja usei), fluticasona (tenho esse), triancinolona, ipratrópio?
[0,0.2556,0.1742,0.2451,0.21,0.213,0.1324,0.1215,0.1716,0.2103,0.1898,0.1976,0.2461,0.206,0.2211,0.2601,0.2865,0.459,0.4425,0.5163,0.5214,0.4871,0.52,0.6192,0.7099,0.7912,0.8887,0.8149,0.9125,0.8732,0.8111,0.8952,1.117,1.1289,1.1448,1.2103,1.2737,1.4336,1.4864,1.534,1.5608,1.6334,1.699,1.846,2.0101,1.743,1.7669,1.3559,1.4277,1.6399,1.5795,1.3473,1.3921,1.327,1.3464,1.3367,1.1828,0.8036,1.0525,1.0487,1.0488,1.2955,1.1756,1.171,1.0004,1.0162,1.122,1.0527,1.1943,1.162,1.3333,1.3207,1.2744,1.3544,1.3539,1.3132,1.2726,1.2492,1.3044,1.3119,1.3523,1.412,1.3633,1.3813,1.413,1.5556,1.6762,1.7591,1.7815,1.85,1.7954,1.832,1.8399,2.0045,1.9762,1.9404,1.8935,1.8603,1.8957,1.9066,1.8701,1.8234,1.947,1.9487,1.9686,1.9787,2.0514,2.1468,2.1714,2.1587,2.0947,2.1703,2.4933,2.5727,2.3301,2.5033,2.4815,2.5542,2.6657,2.788,2.9146,2.8854,3.0167,3.1002,3.281,3.1865,3.4304,3.439,3.7547,3.9516,4.0051,4.1937,4.4008,4.2249,4.3632,4.638,4.6044,4.7383,4.8814,4.8732,4.8655,5.1939,5.5602,5.77,5.4188,6.7777,9.0838,9.1743,9.5292,9.3306,9.5605