-
Go to "Your Apps" page at https://api.slack.com/apps
-
Click on "Create New App" button
-
On the modal, click on "From scratch" to create a new app from scratch
-
In the "App Name" you can put any name in your app and in "Pick a workspace to develop your app in:" choose a workspace were you want to receive the messages.
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 Tables ------------------------------------------------------- | |
CREATE TABLE employments ( | |
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY, | |
name text NOT NULL, | |
department text NOT NULL, | |
salary integer NOT NULL | |
); | |
CREATE UNIQUE INDEX employments_pkey ON employments(id int4_ops); |
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
const sleepSort = (arr) => { | |
const { length } = arr | |
const result = [] | |
return new Promise((resolve) => { | |
for (let index = 0; index < length; index++) { | |
const value = arr[index]; | |
setTimeout(() => { | |
result.push(value) |
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
const getAllDivisors = n => { | |
const divisors = [] | |
let currentNumber = 1 | |
while (currentNumber < n) { | |
if ((28 % currentNumber) === 0) { | |
divisors.push(currentNumber) | |
} | |
currentNumber++ | |
} |
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
const { inferAll } = require("bayesjs"); | |
const { clone } = require("ramda"); | |
const network = JSON.parse( | |
'{"node1":{"id":"node1","states":["T","F"],"parents":["node25","node13","node16","node17","node37"],"cpt":[{"when":{"node25":"T","node13":"T","node16":"T","node17":"T","node37":"T"},"then":{"T":0.99,"F":0.01}},{"when":{"node25":"F","node13":"T","node16":"T","node17":"T","node37":"T"},"then":{"T":0.01,"F":0.99}},{"when":{"node25":"T","node13":"F","node16":"T","node17":"T","node37":"T"},"then":{"T":0.99,"F":0.01}},{"when":{"node25":"F","node13":"F","node16":"T","node17":"T","node37":"T"},"then":{"T":0.01,"F":0.99}},{"when":{"node25":"T","node13":"T","node16":"F","node17":"T","node37":"T"},"then":{"T":0.99,"F":0.01}},{"when":{"node25":"F","node13":"T","node16":"F","node17":"T","node37":"T"},"then":{"T":0.01,"F":0.99}},{"when":{"node25":"T","node13":"F","node16":"F","node17":"T","node37":"T"},"then":{"T":0.99,"F":0.01}},{"when":{"node25":"F","node13":"F","node16":"F","node17":"T","node37":"T"},"then":{"T":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
/** | |
* How does this script work? | |
* You open the 'My Activity' (https://www.netflix.com/viewingactivity) page on | |
* Netflix then open the browser's console and paste the full script and press 'Enter'. | |
* This will create an 'Erase activities' button beside the title. Clicking on | |
* the button a dialog will open asking how many times the button 'Show More' | |
* should be clicked before opening a modal with your activity history in a modal. | |
* If you put a number, the 'Show More' button will be hit, when the load | |
* completes it will be hit again. Many times you wish. | |
* After that, a modal will open with a table with all your series, movies and |
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
class Tipper | |
TAX = 0.05 | |
def initialize(amount:, discount_percentage: 0, tip_percentage:) | |
@amount = amount | |
@discount_percentage = discount_percentage | |
@tip_percentage = tip_percentage | |
end | |
def total |
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
const getSize = matrix => ({ | |
width: matrix[0].length, | |
height: matrix.length | |
}) | |
const goDiagonally = (func, matrix, columnLimit) => (line, column) => { | |
while (line >= 0) { | |
matrix[line][column] = func() | |
line-- |
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
#include <stdio.h> | |
#include <stdlib.h> | |
struct elemento { | |
int mat; | |
struct elemento *ant; | |
}; | |
typedef struct elemento Elemento; | |
int veririficar_vazia(Elemento *pilha); |
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 java.sql.Date; | |
import java.text.SimpleDateFormat; | |
import java.util.*; | |
public class Troquinhos { | |
public static int Intervalo = 100; | |
public static void main(String[] args) { | |
long inicio = System.currentTimeMillis(); |