Skip to content

Instantly share code, notes, and snippets.

View ludoo0d0a's full-sized avatar

LudoO ludoo0d0a

View GitHub Profile
@ludoo0d0a
ludoo0d0a / magicsquare_solver.py
Created September 28, 2012 09:29
Magic square complete solver
'''
Complete solver for all magic square
with preset
Created on Sep 28, 2012
@author: ludoo
'''
from constraint import *
@ludoo0d0a
ludoo0d0a / git pull force
Created May 1, 2015 17:40
Git Resync on remote - Local changes lost
git stash --include-untracked
git pull
@ludoo0d0a
ludoo0d0a / KODI remote.xml
Created May 1, 2015 17:44
XBMC / Kodi - Adds missing remote control menu control (yellow=pause, red=contextual menu, green=fullscreen) [keymaps/remote.xm]
<keymap>
<global>
<remote>
<red>ContextMenu</red>
<green>FullScreen</green>
<yellow>Pause</yellow>
<blue>Info</blue>
</remote>
</global>
<FullscreenVideo>
@ludoo0d0a
ludoo0d0a / gist:8d0cfd1cab22598cb5d8
Created June 11, 2015 18:54
Synology boot locked
Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :
#Admin login via ssh
> synobootseq --set-boot-done
> synobootseq --is-ready
#optional
> /usr/syno/etc/rc.d/S97apache-sys.sh start
> /usr/syno/etc/rc.d/S95sshd.sh start
@ludoo0d0a
ludoo0d0a / gist:2e67eb2e4d01cbb945f0
Created August 11, 2015 09:58
Git undo lastcommit
git reset --soft HEAD~1
source: http://davidwalsh.name/git-undo-commit
@ludoo0d0a
ludoo0d0a / bookmarklet.js
Created March 20, 2017 13:04
Download photos facebook messenger bookmarklet
javascript:var r=[],x=document.getElementsByClassName('_16zz')[0],imgs=x.getElementsByTagName('a');for(i=0;i<imgs.length;i++){var url=imgs.item(i).getAttribute('href');r.push('<img src="'+url+'"/>');}document.write('<p>Press Ctrl+s to save complete page ; pictures will be in the folder aside the html page</p>'+r.join('<br/>'));
@ludoo0d0a
ludoo0d0a / .bash_ssh
Created April 10, 2017 08:24
Start ssh-agent properly and register keys
#
# Start ssh-agent once only and register keys
#
# Usage : put this in .bashrc
# if [ -f ~/.bash_ssh ]; then
# . ~/.bash_ssh
# fi
#
# http://stackoverflow.com/questions/18880024/start-ssh-agent-on-login#18915067
#
@ludoo0d0a
ludoo0d0a / gist-ssh-github.md
Created September 4, 2017 20:24
github ssh keys AND no password

https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

A common mistake is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking the ssh button left to the URL field and updating the URL of your origin remote like this:

git remote set-url origin [email protected]:username/repo.git

See http://stackoverflow.com/questions/7773181/git-keeps-prompting-me-for-password, make sure you are cloning your repos using ssh:

ssh://[email protected]/username/repo.git

@ludoo0d0a
ludoo0d0a / gist:2704333073b56742510e328b5d055271
Created September 4, 2017 20:26 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream