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
#!/bin/bash | |
set -u | |
up() { | |
INSTANCE_TYPE=${INSTANCE_TYPE:-n1-standard-1} | |
curl -sLS https://get.k3sup.dev | sh | |
sudo install k3sup /usr/local/bin/ | |
( | |
set -x |
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
// load the AWS SDK | |
const AWS = require('aws-sdk') | |
// load CloudFront key pair from environment variables | |
// Important: when storing your CloudFront private key as an environment variable string, | |
// you'll need to replace all line breaks with \n, like this: | |
// CF_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE...1Ar\nwLW...2eL\nFOu...k2E\n-----END RSA PRIVATE KEY-----" | |
const cloudfrontAccessKeyId = process.env.CF_ACCESS_KEY_ID | |
const cloudFrontPrivateKey = process.env.CF_PRIVATE_KEY | |
const signer = new AWS.CloudFront.Signer(cloudfrontAccessKeyId, cloudFrontPrivateKey) |
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
proc /proc proc defaults 0 0 | |
PARTUUID=XXXXX /boot vfat defaults 0 2 | |
PARTUUID=XX / ext4 defaults,noatime 0 1 | |
UUID=XXXXXX ext4 defaults,auto,users,rw,nofail 0 0 | |
//XXXXXXXX/XXXX /mnt/ssssss/ cifs credentials=/home/pi/xxxxxxxxx,vers=1.0 0 0 | |
# a swapfile is not a swap partition, no line here | |
# use dphys-swapfile swap[on|off] for that |
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
var AWS = require("aws-sdk"); | |
exports.handler = async (event, context, callback) => { | |
var responseCode = 200; | |
var passcode; | |
if (event.body) { | |
console.log("Data going to encode"); | |
let body = JSON.parse(event.body); | |
/// Get Parameters from form | |
if (body.articleUrl) |
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
var mailgun = require('mailgun-js')({apiKey: api_key, domain: domain}); | |
exports.sendWelcomeEmail = functions.firestore.document('xxx/{userId}').onCreate(event => { | |
var user = event.data.data(); | |
var name = user.Name; | |
var email = user.Email; | |
var data = { | |
from: ' App xxx', | |
subject: 'Welcome to Tools Android App!', |
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
public static void addNewUser(String name, String email, String id, String type){ | |
Map<String, Object> newContact = new HashMap<>(); | |
newContact.put(NAME_KEY, name); | |
newContact.put(EMAIL_KEY, email); | |
newContact.put(ID_KEY, id); | |
newContact.put(TYPE, type); | |
db = FirebaseFirestore.getInstance(); | |
db.collection("Users").document(id).set(newContact) | |
.addOnSuccessListener(new OnSuccessListener<Void>() { | |
@Override |
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
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Properties; | |
import java.util.Scanner; | |
import static com.automation.util.FileUtil.readPropertyFile; | |
/** | |
* Created by Sundeep Machado on 09/09/16. |
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
04-01 20:45:06.880 15295-17093/? D/com.airtel.backup.lib.impl.db.table.VcfUtils: BEGIN:VCARD | |
VERSION:2.1 | |
N:Road;Navade;;; | |
FN:Navade Road | |
TEL;CELL:+XXXXXXXXXXXX | |
ID_ANDROID:20781 | |
END:VCARD |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
#Replace the path | |
path => ["XXXXXXXXX/logging.log"] | |
# Make logstash read from start of file | |
start_position => "beginning" | |
sincedb_path => "/dev/null" |
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
# Root logger option | |
log4j.rootLogger=INFO, file | |
# Direct log messages to a log file | |
log4j.appender.file=org.apache.log4j.RollingFileAppender | |
log4j.appender.file.File=logging.log | |
log4j.appender.file.MaxFileSize=100000MB | |
log4j.appender.file.layout=org.apache.log4j.PatternLayout |
NewerOlder