Skip to content

Instantly share code, notes, and snippets.

View ugurerkan's full-sized avatar
💭
🧙🏻‍♂️

Uğur Erkan ugurerkan

💭
🧙🏻‍♂️
View GitHub Profile
@ugurerkan
ugurerkan / aws-lambda-deploy-helper.sh
Created November 1, 2021 15:27
AWS Lambda Deploy Script
#!/bin/bash
# AWS Lambda Deploy Script
#
# Shell helper for deploy lambda functions
# Make sure aws cli configured and installed before
FUNCTION_NAME="my-lambda-script"
function package() {
@ugurerkan
ugurerkan / zimbra-letsencrypt-renew.md
Last active September 9, 2023 13:19
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.
### Keybase proof
I hereby claim:
* I am ugurerkan on github.
* I am ugurerkan (https://keybase.io/ugurerkan) on keybase.
* I have a public key whose fingerprint is 8FAD F396 CEA3 9C85 C19A 6F74 EF85 B034 B9E6 BFD9
To claim this, I am signing this object:
# toggle iTerm Dock icon
# add this to your .bash_profile or .zshrc
function toggleiTerm() {
echo "Do you wish to hide iTerm in Dock and enable fullscreen visor?"
select ync in "Hide" "Show" "Cancel"; do
case $ync in
'Hide' )
defaults write /Applications/iTerm.app/Contents/Info LSUIElement true
echo "relaunch iTerm to take effectives"
break
var container = document.getElementById('answer');
for(var i = 1; i <= 5; i++) {
var a = document.createElement("a");
a.innerHTML = "link" + i + " ";
var onClick = function () {
var i = this.innerHTML.substr(-2);
alert(i);
};
@ugurerkan
ugurerkan / lipsum.gen.php
Created November 14, 2013 09:51
PHP lipsum text generator
<?php
function loremGen($max)
{
$str = '';
$lorem = array('Lorem ipsum dolor sit amet, consectetur adipiscing elit. ',
'Nunc pharetra urna mi. ',
'Suspendisse semper ipsum et leo varius, id posuere odio interdum. ',
'Pellentesque ut turpis porttitor, scelerisque felis eget, malesuada dolor. ',
'Ut nec ultrices nibh. Proin eleifend adipiscing lectus quis volutpat. ',
@ugurerkan
ugurerkan / tr_ucfirst.php
Created April 20, 2012 13:04
tr_ucfirst
function tr_ucfirst($str)
{
$f = mb_substr($str, 0,1);
switch($f)
{
case 'i':
$r = 'İ';
break;
case 'ç':