Skip to content

Instantly share code, notes, and snippets.

View olotintemitope's full-sized avatar
🎼
Working from home

Temitope Olotin olotintemitope

🎼
Working from home
View GitHub Profile
@olotintemitope
olotintemitope / sms.php
Created September 11, 2022 18:22 — forked from ankitsam/sms.php
Send SMS using AWS SNS via AWS PHP SDK
use Aws\Sns\SnsClient;
$sns = \Aws\Sns\SnsClient::factory(array(
'credentials' => [
'key' => '<access_key>',
'secret' => '<access_secret>',
],
'region' => '<region>',
'version' => 'latest',
));
@olotintemitope
olotintemitope / gcal_countries.py
Created December 29, 2021 16:59 — forked from seanblanchfield/gcal_countries.py
Google calendar public holiday names by country
# Complete mapping of ISO 3166 2-letter country codes to descriptions used in Google calendar URLs, accurate as of 29 July 2021.
iso_to_gcal_description = {
"ad": "ad",
"ae": "ae",
"af": "af",
"ag": "ag",
"ai": "ai",
"al": "al",
"am": "am",
@olotintemitope
olotintemitope / media-query.css
Created December 10, 2019 10:24 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
function findIntersection($array1, $array2) {
$intersect = [];
foreach($array2 as $value) {
if (array_key_exists($value, $array1) && $array1[$value] == $value) {
$intersect[] = $value;
}
}
return $intersect;
}
@olotintemitope
olotintemitope / VagrantFile
Created September 6, 2018 19:51 — forked from ricardocanelas/VagrantFile
Vagrant / PHP7.1 + MySQL5.6 + Apache
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.100.100"
config.vm.synced_folder "./www", "/var/www/", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
@olotintemitope
olotintemitope / .bash_profile
Created April 9, 2018 12:34 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@olotintemitope
olotintemitope / DeletedFilter.php
Created September 8, 2017 13:08 — forked from baptistedonaux/DeletedFilter.php
Soft Delete Symfony/Doctrine
<?php
namespace Namespace\MyBundle\Repository\Filters;
use Doctrine\ORM\Mapping\ClassMetaData;
use Doctrine\ORM\Query\Filter\SQLFilter;
class DeletedFilter extends SQLFilter
{
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
@olotintemitope
olotintemitope / Common-Currency.json
Created November 30, 2016 11:14 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},