This file contains hidden or 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 main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"strconv" | |
"strings" | |
"github.com/PuerkitoBio/goquery" |
This file contains hidden or 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 { gql, ApolloServer } = require('apollo-server'); | |
const typeDefs = gql` | |
type Query { | |
greeting: String | |
} | |
`; | |
const resolvers = { | |
Query: { |
This file contains hidden or 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
version: '3.7' | |
services: | |
datascience-notebook: | |
image: jupyter/datascience-notebook | |
volumes: | |
- ./data:/home/jovyan/work | |
ports: | |
- 8888:8888 | |
container_name: ds-notebook |
This file contains hidden or 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 main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) | |
type Item struct { |
This file contains hidden or 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 main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
) |
This file contains hidden or 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 com.company; | |
import javax.net.ssl.HttpsURLConnection; | |
import java.io.*; | |
import java.net.URL; | |
import java.net.URLEncoder; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains hidden or 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
require 'net/ldap' | |
class LdapService | |
def con | |
@base = "dc=example, dc=com" | |
@ldap = Net::LDAP.new | |
@ldap.host = host |
This file contains hidden or 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
require 'net/ldap' | |
class LdapService | |
def con | |
@ldap = Net::LDAP.new | |
@ldap.host = '172.22.0.10' | |
@ldap.port = 389 | |
@ldap.auth "CN=SSO,OU=SISTEMAS,OU=Users,OU=Desenvolvimento,OU=GEINF,OU=CRE,OU=SEFIN,DC=sefin,DC=ro,DC=gov,DC=br", "password" |
This file contains hidden or 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
#Add this line in controller | |
include ActionController::HttpAuthentication::Token::ControllerMethods | |
before_action :authenticate | |
#Method to get the token via Header | |
#You can create some custom pattern, in this case I use Bearer. | |
private | |
def authenticate |
NewerOlder