Skip to content

Instantly share code, notes, and snippets.

View RadwaKamal's full-sized avatar
🦚

Radwa Kamal RadwaKamal

🦚
  • Cairo, EG
View GitHub Profile
@RadwaKamal
RadwaKamal / change_convention.py
Created March 17, 2016 11:51
A simple python script to convert naming convention from lower camel case to snake case in a file.
#!/usr/bin/env python
#Simple python script to change lower camel case strings in a file to snake case
import sys
import re
#detect if the string is lower camel case
def is_camel(word):
bol = re.search('\w([a-z][A-Z])', word)
return bol
@RadwaKamal
RadwaKamal / task.sh
Last active December 10, 2016 13:15
Shell script to generate <tag_name>.md file automatically for a jekyll blog.
#!/bin/bash
target=(_posts/*.md)
prv_last_file=`cat last_file.txt`
tag_template=`cat tag_template.md`
for ((i=${#target[@]}-1; i>=0; i--)); do
if [ "$prv_last_file" == "${target[$i]}" ]; then
echo ${target[${#target[@]}-1]} > last_file.txt
echo "We are done, Thank you!"
break