Skip to content

Instantly share code, notes, and snippets.

View aashishg's full-sized avatar
😃
Happy

Aashish Gangwani aashishg

😃
Happy
  • India
View GitHub Profile
current directory: /Users/aashishgangwani/.rvm/gems/ruby-2.7.1/bundler/gems/rrdiff-6742766bf0e0/ext/rrdiff
/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/bin/ruby -I /Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0 -r ./siteconf20210727-47852-a9wtwt.rb extconf.rb
checking for -lrsync... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
have_library: checking for -lrsync... -------------------- no
"gcc -o conftest -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/-darwin20 -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I. -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wno-error=implicit-function-declaration -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-va
@aashishg
aashishg / git-process.sh
Last active October 16, 2021 18:08
Standard shell commands for creating a new git repository
git init
git add .
git add .gitignore
git commit -m "first commit"
# Make a new repo on github
git remote add origin git@github.com:username/new_repo
#check branch
git branch
git branch -M master
@aashishg
aashishg / git-download-big-repo.sh
Created November 3, 2018 09:44
Use this when downloading big repos, usually >100MB
#First, turn off compression:
git config --global core.compression 0
#Next, let's do a partial clone to truncate the amount of info coming down:
git clone --depth 1 <repo_URI>
#When that works, go into the new directory and retrieve the rest of the clone:
git fetch --unshallow
#or, alternately,
git fetch --depth=2147483647
#Now, do a regular pull:
git pull --all
@aashishg
aashishg / convert-images-to-text-tesseract-uzn.sh
Created October 22, 2018 19:19
This script converts images to text using a single template uzn file and tesseract. The script is written to work with pdfimages, a linux utility used to extract images from a single pdf.
#!/bin/bash
# For running this script you need to first run:
# pdfimages -j in.pdf ./somefolder
# pdfimages is an utility that extracts images from pdf
# This script copies a template uzn(image-00) file
# by the number of times specified in the
# first argument. It then goes on to parse
@aashishg
aashishg / Resolve-git-merge-conflict-locally.sh
Created October 8, 2018 11:33
Commands and process to resolve merge conflict locally
git stash
git checkout release branch
git pull origin
git checkout developer branch
git merge
resolve merge
git add conflict files
git commit files to developer
git stash pop
# Reference https://stackoverflow.com/questions/12804841/how-can-apache-be-allowed-to-send-email
Selinux may cause the issue, to verify run:
getsebool -a | grep mail
If it displays as bellow it is selinux:
allow_postfix_local_write_mail_spool --> off
You may disabled it, but if you want to keep it (and you should as it provides an extra layer of security) you should do something else:
@aashishg
aashishg / Sats4SDGs.ipynb
Created September 30, 2018 09:28 — forked from sravya8/Sats4SDGs.ipynb
How can Stats help the SDGs? Quick answer for #satsummit.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aashishg
aashishg / center-with-absolute.css
Created September 26, 2018 10:12
Center an absolute positioned element with translate
.center-absolute{
width: 800px;
position: absolute;
/*bottom: 0;*/
left: 50%;
transform: translateX(-50%) !important;
}
/*
The way this works is because if translate is used with a percentage value, its value is calculated based on the elements height/width on which it is applied on.
@aashishg
aashishg / restorepermissions.sh
Last active October 4, 2018 06:52
Restore permissions in linux system
#!/bin/bash
# This script restores permissions in a directory recursively parsing them,
# giving file permissions as 644 and folder permissions as 755
# Please pass directory_name as first argument when running the script
# through bash terminal
sudo find $1 '(' -type f -exec chmod 644 {} ';' ')' -o '(' -type d -exec chmod 755 {} ';' ')'