Skip to content

Instantly share code, notes, and snippets.

View lekansogunle's full-sized avatar

Olalekan Tosin Sogunle lekansogunle

View GitHub Profile
@lekansogunle
lekansogunle / writinganswers.md
Last active May 2, 2016 06:28
Writing Sample Answers

1.Email issues.

Thanks for reaching out about your concerns. I will be pointing you to a section of the Travis CI documentation, specifically https://docs.travis-ci.com/user/notifications#Email-notifications. There you can follow instructions on setting the exact email you want to receive email notifications. Since you already have your secondary email address registered on github you only need to assign this secondary email to your git config to receive notifications there.

git config user.email "mynewemail@example.com”

Or set the email for all of your git repositories:

alias ga='git add'
alias gp='git push'
alias gl='git log'
alias gs='git status'
alias gd='git diff'
alias gdc='git diff - cached'
alias gcm='git commit -m'
alias gma='git commit -am'
alias gb='git branch'
alias gco='git checkout'
@lekansogunle
lekansogunle / index.html
Last active October 11, 2019 10:36
Youtube player
<!DOCTYPE html>
<html>
<head>
<title>Youtube Player</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="./css/style.css">
<script src="https://code.jquery.com/jquery-3.4.1.js"
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous">
</script>
<script src="./js/index.js"> </script>
@lekansogunle
lekansogunle / index.js
Last active October 11, 2019 10:55
Youtube player js
$(document).ready(() => {
// doSearch
// get text in search input
// make ajax call
// populate divs with results
const doSearch = () => {
// Get text fom input search box
let searchQuery = $('.search input:text').val();
// Here we are composing the endpoint with query parameters as defined from https://developers.google.com/youtube/v3/docs/search/list
// part=snippet is like a required default
import json
import csv
saved_replies = 'saved_replies.json'
with open(saved_replies) as json_data:
d = json.load(json_data)
starting_point = d['saved_replies']
require 'aws-sdk-polly'
class TextToSpeech
attr_reader :contents, :polly
def self.convert(contents)
new(contents).convert
end
def initialize(contents)
@polly = Aws::Polly::Client.new
@lekansogunle
lekansogunle / main.tf
Last active August 27, 2021 08:01
Using Terraform IAC to Deploy your free VPN server on AWS
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
provider "aws" {
region = var.server_region
variable "server_region" {
description = "Region to deploy server"
type = string
default = "eu-central-1"
}
variable "server_username" {
description = "Admin Username to access server"
type = string
default = "openvpn"
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
provider "aws" {
region = var.server_region
}