Skip to content

Instantly share code, notes, and snippets.

View NoSkillGuy's full-sized avatar
:shipit:
Aspiring Entrepreneur

SivaPraveenR NoSkillGuy

:shipit:
Aspiring Entrepreneur
View GitHub Profile
[
[1, ["1", "c", "p", "🐱", "æ", "❗", "🐸", "♥", "❣", "✟"]],
[2, ["to","is","ai","cc","co","io","is","us","ac","ai","bz","ca","cc","ch","cm","co","cx","de","es","eu","fm","fr","gg","in","io","la","li","me","mx","nl","nu","pe","ph","pw","sg","sh","so","to","tv","uk","vc","ws","us","is","ai","vc","co","vc","fm","tv","vc","移动","fm","ai","gg","io","移动","co","so","gg","fm","gg","id","me","to","is","de","la","sg","nl","移动","0z","1d","1q","35","49","4k","8s","aj","c4","d5","d8","dg","dh","ds","dy","ep","ez","fd","fe","fw","hb","hf","hx","i1","ib","ih","ik","iw","ja","jf","js","jy","kf","kj","kl","kq","ks","kv","lo","lw","lz","ob","od","oh","oo","oq","ot","pv","pz","qd","qf","qg","qh","qk","qn","qo","qy","rh","rl","rn","rz","tx","u2","ud","ue","uf","vj","vq","w8","wc","wh","wj","wl","wq","wr","wt","x2","xa","xb","xc","xf","xg","xi","xk","🇺🇦","xq","xr","yb","yd","yh","yj","yo","yq","yx","zc","zh","zp","zs","zx","zy",
"id"]],
[3, ["tel", "top", "vip", "wtf", "xyz", "eco", "inc", "bet", "bot", "day", "ing", "n
@NoSkillGuy
NoSkillGuy / azure_upload.sh
Created October 18, 2018 18:12
A simple script to upload to Azure blob storage
#!/bin/bash
source $HOME/.profile
azure_uploads="$(find /path_to_uploads -type f)"
for current_file in $azure_uploads
do
current_file_md5_hash="$(echo $(md5sum $current_file | nawk '{print $1}') | xxd -r -p | base64)"
az storage blob upload -f $current_file -c reports -n $current_file --account-name $AZURE_STORAGE_NAME --account-key $AZURE_STORAGE_KEY --content-md5 $current_file_md5_hash
uploaded_file_md5_hash="$(az storage blob show --container-name reports --name $current_file --account-name $AZURE_STORAGE_NAME --account-key $AZURE_STORAGE_KEY --query properties.contentSettings.contentMd5)"
if [ "\"$current_file_md5_hash\"" == $uploaded_file_md5_hash ];
then
@NoSkillGuy
NoSkillGuy / purge-mysql.sh
Created May 1, 2018 07:35
completely remove mysql in ubuntu
# A prompt will appear whether to delete all the databases. A manual Yes/No is required.
sudo apt-get -y remove --purge mysql*
sudo apt-get purge mysql*
sudo apt-get -y autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
@NoSkillGuy
NoSkillGuy / git-config.md
Last active February 12, 2018 07:26
Different git configurations for different projects

For global settings.

git config --global --edit

For local settings for individual projects.

git config --local --edit
@NoSkillGuy
NoSkillGuy / main.rb
Created February 6, 2018 08:54
Vagrant port forwarding in sinatra app
require 'sinatra'
set :bind, '0.0.0.0'
get '/' do
'Hello world!
end
@NoSkillGuy
NoSkillGuy / database_sizes.sql
Last active September 8, 2017 12:16
Script to check how much database space is consumed in the hard disk.
SELECT table_schema "Data Base Name",
sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES GROUP BY table_schema;
SELECT table_schema "Data Base Name",
sum( data_length + index_length ) / 1024 / 1024 / 1024 "Data Base Size in GB",
sum( data_free )/ 1024 / 1024 / 1024 "Free Space in GB"
FROM information_schema.TABLES GROUP BY table_schema;