Skip to content

Instantly share code, notes, and snippets.

View camisetags's full-sized avatar
🎱
playing around with code

Gabriel Seixas camisetags

🎱
playing around with code
View GitHub Profile
const inputA = 'AAAAAAAAAAAAABBCCCCDD'
function runLength(string) {
let result = '';
let count = 1;
let current = string[0];
for (let i = 1; i < string.length; i++) {
if (string[i] === current && count < 9) {
count++;
} else {
### Keybase proof
I hereby claim:
* I am camisetags on github.
* I am camisetags (https://keybase.io/camisetags) on keybase.
* I have a public key ASAShcSVqFZnETxLNDc3QT83ke8hcK2VTWIEtQPsDKSyhwo
To claim this, I am signing this object:
@camisetags
camisetags / pub
Last active April 16, 2021 01:54
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGB45m8BEADlbFfk9SyNG7quK+fHKczoqV/9HQebGgqoFUs7RS9jxcga8IBV
U82eW2hrGvobTD2S5BPkRZFYge//ikJNz9sb60W0o0HqMS+t+UKgcbwXmlQ9Zg8S
JLBgXeGvnEYtbN22ZjORb+2YLCCFgFwJEBAa7KC10fjG69pzcQ8jrH38ohV8Rkv7
06soZS52qSg07uDkcIxzhKtAk2Na6kBW0kZ+fDOjPbzNWZ/KDKLqRx2zMVkthyZs
SyKG/fXQbFRfBSfzZNSstwZ8A4HtpGF5bHtJybSIBBzRuv3qyKxo0t/MHqGm+h2k
Meg7bzsP4um0ZFiPQaiDkSStIaeLl99SCybxQoJxiDMJWWm0MulAFVFztGRXAqgz
zj6N8A4FM1z2RT9kUomnv2oBX9VB5ycC16O9i63oB1gab3OoyVsSMxwj1jivZHZB
sRMZCOoW/cgSFF5TPDmmL9VMaXmnDdAEjTups6htiyyLxYoWQyxIGHGoZUAlnpIJ
@camisetags
camisetags / compress.py
Created May 21, 2020 06:47
Compress challenge
"""
Given an array of characters with repeats, compress it in place.
The length after compression should be less than or equal to the original array.
Example:
Input: ['a', 'a', 'b', 'c', 'c', 'c']
Output: ['a', '2', 'b', 'c', '3']
"""
import unittest
@camisetags
camisetags / producer_consumer.go
Created December 3, 2019 21:21
Producer Consumer
package main
import (
"fmt"
"time"
"math/rand"
"sync"
)
type Message struct {
@camisetags
camisetags / sortTransaction.js
Last active November 30, 2020 02:00
transactionChallenge
// from codepad
var Mocha = require('mocha')
var mocha = new Mocha()
mocha.suite.emit('pre-require', this, 'solution', mocha)
var assert = require("chai").assert;
var transacts = [
{
@camisetags
camisetags / sticker-da-galera.json
Last active September 4, 2018 17:32
sticker-da-galera
[
{
"nome": "Diego",
"stickers": [
"https://www.nerdstickers.com.br/todos/rm-star-wars/",
"https://www.nerdstickers.com.br/todos/rm-star-wars-ii/"
],
"total": 11.98
},
{
@camisetags
camisetags / produce_consumer.py
Created May 23, 2018 14:42
producer-consumer-asyncio
import asyncio
import random
async def produce(queue, n):
for x in range(n):
# produce an item
print('producing {}/{}'.format(x, n))
# simulate i/o operation using sleep
await asyncio.sleep(random.random())
@camisetags
camisetags / cloudSettings
Last active July 7, 2021 23:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-07T23:43:49.149Z","extensionVersion":"v3.4.3"}
@camisetags
camisetags / README.md
Created February 16, 2017 01:06 — forked from erichrobinson/README.md
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable