Skip to content

Instantly share code, notes, and snippets.

Avatar
🐿️
There's no capybara emoji yet.

Capi Etheriel barraponto

🐿️
There's no capybara emoji yet.
View GitHub Profile
View docker-compose.yml
version: "3.7"
services:
db:
environment:
POSTGRES_PASSWORD: postgres
image: postgres:alpine
ports:
- "5432:5432"
volumes:
- ./docker/db/pgdata:/var/lib/postgresql/data
@barraponto
barraponto / linked-list.js
Last active Oct 17, 2019
Linked List Find By Position Tests
View linked-list.js
/* eslint-env node, mocha */
const { expect } = require('chai')
const LinkedList = require('../src/linked-list');
describe('Linked List', () => {
it('Creates empty Linked Lists', () => {
const list = new LinkedList();
expect(list).to.be.instanceOf(LinkedList);
expect(list.head).to.be.null;
});
View senhas-biscos.md

NÃO REPITA AS SUAS SENHAS


Modelo de risco:

por que suas senhas estão ameaçadas?

View chatbot.sql
CREATE TABLE problemas (
id INT AUTO_INCREMENT PRIMARY KEY,
problema_1 VARCHAR(100) NOT NULL,
problema_2 VARCHAR(100),
problema_3 VARCHAR(100),
problema_4 VARCHAR(100),
problema_5 VARCHAR(100),
problema_6 VARCHAR(100),
problema_7 VARCHAR(100),
problema_8 VARCHAR(100),
View preprova.sql
/* exercicios 1 e 2 */
CREATE TABLE clientes (
id INT AUTO_INCREMENT PRIMARY KEY,
nome VARCHAR(64) NOT NULL,
endereco VARCHAR(256),
cidade VARCHAR(128),
telefone VARCHAR(13) NOT NULL,
rg VARCHAR(13),
inscricao DATE NOT NULL,
fidelidade INT DEFAULT 0
View ViewsRenderedSelection.php
<?php
namespace Drupal\views_selection_rendered_widget\Plugin\EntityReferenceSelection;
use Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection;
/**
* Plugin implementation of the 'selection' entity_reference.
*
View gist:f7eb80dea1dd96821baf7f6c296883f9
1. "category"
Type of data: Text
Contains null values: False
Unique values: 159
Longest value: 18 characters
Most common values: Product Design (3531x)
Tabletop Games (3179x)
Shorts (3154x)
Documentary (3047x)
View RouteSubscriber.php
<?php
namespace Drupal\mail_login_rpc\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
* Swaps default rpc login controller with ours.
*/
View cycle_keyboard_brightness.py
'''Cycles keyboard brightness levels using DBus.'''
import dbus
def main():
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.UPower',
'/org/freedesktop/UPower/KbdBacklight')
interface = dbus.Interface(proxy, 'org.freedesktop.UPower.KbdBacklight')
current_level = interface.GetBrightness()
View server.js
const { Server } = require('boardgame.io/server');
const { TicTacToe } = require('gamux-tictactoe');
const logger = require('koa-logger');
const cors = require('koa-cors');
const server = Server({ games: [ TicTacToe ] });
server.app.use(logger());
server.app.use(cors());