Skip to content

Instantly share code, notes, and snippets.

@barthflo
barthflo / gist:ca4b210b9b6b4a4cda898e74ca64ff38
Created September 18, 2020 08:39
WCS - Git/Github 5 - Revert
flo@kubuntu:~/Documents/Wild Code School/quests/Git/my-website-oops$ git log --oneline
5d2a82d (HEAD -> master) added some content
94ccae9 modified title
7e4878a created index.html
flo@kubuntu:~/Documents/Wild Code School/quests/Git/my-website-oops$ git revert HEAD
[master 3d41213] Revert "added some content"
1 file changed, 11 insertions(+), 13 deletions(-)
rewrite index.html (71%)
flo@kubuntu:~/Documents/Wild Code School/quests/Git/my-website-oops$ git log --oneline
3d41213 (HEAD -> master) Revert "added some content"
@barthflo
barthflo / gist:c7e010127b3f572a393be58502aa0b38
Created September 17, 2020 10:28
WCS - Git/GitHUB 5 - Merge & Conflicts
flo@kubuntu:~/Documents/Wild Code School/quests/Git/merge-conflicts$ git pull
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Automatic merge failed; fix conflicts and then commit the result.
flo@kubuntu:~/Documents/Wild Code School/quests/Git/merge-conflicts$ git status
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
// Find Command
flo@kubuntu:~/Documents/Wild Code School/quests/shell$ find planets
planets
planets/fictionnal
planets/fictionnal/coruscant.jpeg
planets/fictionnal/cybertron.jpeg
planets/fictionnal/arrakis.jpeg
planets/inhabited
planets/inhabited/coruscant.jpeg
@barthflo
barthflo / gist:8263e455c790ec51873c88ac8c7ee3af
Created September 14, 2020 14:27
WCS - Linux -Terminal 1
dpkg-mergechangelogs lesskey ps2pdf12 who
dpkg-name lesspipe ps2pdf13 whoami
dpkg-parsechangelog lexgrog ps2pdf14 whois
dpkg-query libnetcfg ps2pdfwr whoopsie
dpkg-scanpackages libreoffice ps2ps whoopsie-preferences
dpkg-scansources libwacom-list-local-devices ps2ps2 word-list-compress
dpkg-shlibdeps linguist ps2txt wordview
dpkg-source link psfaddtable wpa_passphrase
dpkg-split linkicc psfge
@barthflo
barthflo / gist:0ccdf17aa1266c5a774528dee07e291a
Last active August 8, 2020 08:27
Created a pseudo-code algorithm
start maxBuy (real money, real price)
int maxBuy ← 0
IF money AND price > 0
As long as money >= price
money ← money - price
maxBuy ← maxBuy+1
End As long as
End IF