Skip to content

Instantly share code, notes, and snippets.

@alishir
alishir / gist:5566e19c37de7083574f
Last active August 29, 2015 14:27 — forked from danielcompton/gist:9719633
Data Science Learning
- [ ] Math
- [ ] Linear Algebra
- [ ] Lay - Linear Algebra
- [ ] 18.06 Linear Algebra
http://www.scotthyoung.com/blog/mit-challenge/#more-link1806
- [ ] Burke Lecture Notes
http://www.math.washington.edu/~burke/crs/407/lectures/
- [ ] Coding The Matrix
http://www.amazon.com/dp/0615880991/?tag=coursera-course198-20
- [ ] Quantifying Uncertainty
@alishir
alishir / anki_styles.md
Created June 29, 2015 11:33
anki styles.

Front Template

<div style='font-family: XB Niloofar; font-size: 20px;'>
{{Front}}
</div>

Styling

 .card {
@alishir
alishir / gist:935b0e55c3ea0a33843d
Created January 29, 2015 12:04
How to fix “Package is in a very bad inconsistent state” error?
#https://askubuntu.com/questions/148715/how-to-fix-package-is-in-a-very-bad-inconsistent-state-error/170808#170808?newreg=465ded63100d49fb994916f9357b88e1
sudo dpkg --remove --force-remove-reinstreq <pkg name>
@alishir
alishir / client.js
Last active August 29, 2015 14:07 — forked from tbranyen/client.js
(function(window, document) {
// The end user should be allowed to disable synchronization. This button
// is optional on the page
var syncAllow = true;
var syncButton = document.querySelector('.sync-button');
// If the sync button exists bind a click event and toggle the syncAllow
// boolean. Set the value of the button.
if(syncButton) {
@alishir
alishir / soft2hard.sh
Created July 23, 2013 12:15
Convert Soft Links to Hard Links from: Ryan's Bliggity Blog
#!/usr/bin/env bash
# soft2hard.sh by Ryan Helinski
# Replace a soft (symbolic) link with a hard one.
#
# $1 is name of soft link
# Returns 0 on success, 1 otherwise
#
# Example: To replace all the soft links in a particular directory:
# find ./ -type l | tr \\n \\0 | xargs -0 -n 1 soft2hard.sh
#
@alishir
alishir / tugit
Created July 20, 2013 13:56
tugit script ...
cd ~/doc/code/commits
git commit --allow-empty -am "$1"
git push > /dev/null 2>&1 &
@alishir
alishir / vim_school.md
Last active December 20, 2015 00:19
all thing related to vim

:h text-objects --> i{

:h tabpage --> handle tabs

@alishir
alishir / dup_remover.sh
Created July 10, 2013 19:06
remove duplicate files
duff -r * > duplicate.txt
csplit -z -f dup_ duplicate.txt /files\ in\ cluster/ {*}
for dup in `ls dup_*`;
do
cat $dup | while read l;
do
if [[ $l =~ .*_.* ]];
then
echo "keep: $l";
@alishir
alishir / farsi_in_vim.md
Last active January 8, 2021 08:05
نصب vim با قابلیت فارسی‌نویسی

ابتدا سورس کد‌ را دانلود کنید

بعد هرچه بسته نیازمند است دانلود کنید

بعد روش سابق

./configure --with-features=huge

make

@alishir
alishir / xls_csv.sh
Last active December 17, 2015 18:59
XLS to CSV for decision analysis ...
#!/usr/bin/env bash
awk -F, '
BEGIN {
printf("\"id\",\"choices\",\"group\"\n");
}
{
if (NR > 1)
{
str = "";
for(i = 7; i <= NF; i++)