Skip to content

Instantly share code, notes, and snippets.

View dobleuber's full-sized avatar

Wbert Adrián Castro Vera dobleuber

View GitHub Profile
@dobleuber
dobleuber / Readme.md
Created August 3, 2024 15:45
Adding HTTPS to dockerized site
song_id,total_pageviews,unique_pageviews,unique_pageviews_from_full_query,total_pageviews_from_full_query,Unique comparison,Total comparison,diff
1,16,11,11,16,TRUE,TRUE,0
3,61,26,26,61,TRUE,TRUE,0
5,24,21,21,24,TRUE,TRUE,0
6,15,9,9,15,TRUE,TRUE,0
7,437,346,347,437,FALSE,TRUE,-1
8,1,1,1,1,TRUE,TRUE,0
9,1,1,1,1,TRUE,TRUE,0
10,6,5,5,6,TRUE,TRUE,0
11,1,1,1,1,TRUE,TRUE,0
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
5153288
44817
7824003
390642
3592605
5517690
6001498
5516845
3848795
3109163
@dobleuber
dobleuber / spammers.csv
Created February 21, 2024 21:04
2024-02-10 spammers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
21555084
21555579
21555248
21554991
21555136
21555232
21556593
21555422
21555141
21555124
@dobleuber
dobleuber / ABC.md
Created March 23, 2021 22:25 — forked from jdnichollsc/ABC.md
The Job Interview Guide

The Job Interview Guide 💼

And English is a Work in Progress ⌛

@dobleuber
dobleuber / models.py
Created August 28, 2020 20:54
Rest-api
from django.db import models
from django.contrib.auth.models import User
class Post(models.Model):
description = models.CharField(max_length=512)
created = models.DateTimeField()
owner = models.ForeignKey(User, on_delete=models.CASCADE, related_name='posts')
picture = models.FileField()
title = models.CharField(max_length=128)
@dobleuber
dobleuber / stringPermutations.js
Created July 29, 2020 03:34
Hallar las permutaciones de un string.
const stringPermutations = str => {
if (str.length === 1) return [str];
return str
.split('')
.reduce(
(acc, letter, i) =>
acc.concat(
stringPermutations(str.slice(0, i) + str.slice(i + 1)
)
.map(val => letter + val))
class TestContainer extends React.Componen{
render () {
const {initialState = {}, children} = this.props;
return (
<MemoryRouter
keyLength={0}
>
{
children
}
var QueryString = function () {
var query_string = {};
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
query_string[pair[0]] = pair[1];
}
return query_string;
var QueryString = function () {
var query_string = {};
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
query_string[pair[0]] = pair[1];
}
return query_string;