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 auth | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"github.com/golang-jwt/jwt" |
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 nodemailer = require("nodemailer"); | |
const { google } = require("googleapis"); | |
const OAuth2 = google.auth.OAuth2; | |
const clientId = process.env.CLIENT_ID; | |
const clientSecret = process.env.CLIENT_SECRET; | |
const refreshToken = process.env.REFRESH_TOKEN; | |
const from = process.env.FROM; | |
const to = process.env.TO; |
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
[ | |
{ | |
"title": "Zero Trust Networks: Building Secure Systems in Untrusted Networks", | |
"authors": "Evan Gilman, Doug Barth", | |
"picture": "https://images-na.ssl-images-amazon.com/images/I/51FEu6AhMfL._SX379_BO1,204,203,200_.jpg", | |
"link": "https://www.amazon.com/Zero-Trust-Networks-Building-Untrusted/dp/1491962194/" | |
}, | |
{ | |
"title": "Defensive Security Handbook: Best Practices for Securing Infrastructure", | |
"authors": "Lee Brotherston, Amanda Berlin", |
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
function onFormSubmit(e) { | |
var url = //TODO; | |
var formId = //TODO; | |
var form = FormApp.openById(formId); | |
var formResponses = form.getResponses(); | |
var formResponse = formResponses[formResponses.length - 1]; | |
var itemResponses = formResponse.getItemResponses(); | |
var data = itemResponses.map(function(item) { | |
return { id: item.getItem().getId(), text: item.getItem().getTitle(), response: item.getResponse()}; |
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
#!/bin/bash | |
cd /Users/{user}/Library/Safari | |
while IFS='#' read -r title url | |
do | |
/usr/libexec/PlistBuddy Bookmarks.plist -c "Add :Children:1:Children:0 dict" | |
/usr/libexec/PlistBuddy Bookmarks.plist -c "Add :Children:1:Children:0:URIDictionary dict" | |
/usr/libexec/PlistBuddy Bookmarks.plist -c "Add :Children:1:Children:0:URIDictionary:title string ${title}" | |
/usr/libexec/PlistBuddy Bookmarks.plist -c "Add :Children:1:Children:0:URLString string ${url}" | |
/usr/libexec/PlistBuddy Bookmarks.plist -c "Add :Children:1:Children:0:WebBookmarkType string WebBookmarkTypeLeaf" |
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
#Environment variables: HEROKU_API_KEY, HEROKU_APP | |
image: ubuntu:bionic | |
stages: | |
- deploy | |
before_script: | |
# OS dependencies | |
- apt-get update |
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
[Unit] | |
Description=Vault dev server | |
[Service] | |
Type=simple | |
ExecStart=/home/ec2-user/vault server -dev -dev-listen-address=0.0.0.0:8200 |
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
version: '2' | |
services: | |
db: | |
environment: | |
- MYSQL_ROOT_PASSWORD=pass | |
image: mariadb | |
admin: | |
links: | |
- db | |
ports: |
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
/* | |
* This is the source code of Telegram for Android v. 3.x.x. | |
* It is licensed under GNU GPL v. 2 or later. | |
* You should have received a copy of the license in this archive (see LICENSE). | |
* | |
* Copyright Nikolai Kudashov, 2013-2016. | |
*/ | |
package org.telegram.messenger; |
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.io.UnsupportedEncodingException; | |
import java.math.BigInteger; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
class MD5 { | |
public String encrypt(String token) { | |
int RESULT_LENGTH = 16; |
NewerOlder