This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE heroes ( | |
id SERIAL PRIMARY KEY, | |
fantasy_name VARCHAR NOT NULL, | |
real_name VARCHAR NULL, | |
spotted_photo TEXT NOT NULL, | |
strength_level INT NOT NULL DEFAULT 0 | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE heroes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "heroes" | |
version = "0.1.0" | |
authors = ["luisvonmuller <luis@vonmuller.com.br>"] | |
edition = "2018" | |
[dependencies] | |
rocket = "0.4.5" | |
rocket_codegen = "0.4.5" | |
diesel = { version = "1.4.5", features = ["postgres"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(proc_macro_hygiene, decl_macro)] | |
/* Our extern crates */ | |
#[macro_use] | |
extern crate diesel; | |
#[macro_use] | |
extern crate rocket; | |
extern crate dotenv; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Import macros and others */ | |
use crate::schema::*; | |
/* For beeing able to serialize */ | |
use serde::Serialize; | |
#[derive(Debug, Queryable, Serialize)] | |
pub struct Hero { | |
pub id: i32, | |
pub fantasy_name: String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To be able to return Templates */ | |
use rocket_contrib::templates::Template; | |
use std::collections::HashMap; | |
/* Diesel query builder */ | |
use diesel::prelude::*; | |
/* Database macros */ | |
use crate::schema::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match stxt { | |
stxt.contains("ana") => { | |
//dosomething | |
}, | |
stxt.contains("woobs") => {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linkedin = { | |
config: { | |
scrollDelay: 500, | |
actionDelay: 500, | |
nextPageDelay: 2000, | |
// set to -1 for no limit | |
maxRequests: 100, | |
totalRequestsSent: 0, | |
}, | |
init: function (data, config) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linkedin = { | |
config: { | |
scrollDelay: 500, | |
actionDelay: 500, | |
nextPageDelay: 2000, | |
// set to -1 for no limit | |
maxRequests: -1, | |
totalRequestsSent: 0, | |
}, | |
init: function (data, config) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var linkedinhoAutoInviter = class { | |
constructor(maxInvites, actionDelay, pageDelay, ScrollDelay) { | |
this.pageButtons = []; | |
this.alreadyInvited = 0; | |
this.maxInvites = maxInvites; | |
this.actionDelay = actionDelay; | |
this.pageDelay = pageDelay; |
OlderNewer