Skip to content

Instantly share code, notes, and snippets.

@MadiNaf
MadiNaf / github_desktop_ubuntu.sh
Created December 3, 2021 21:23 — forked from berkorbay/github_desktop_ubuntu.md
To install Github Desktop for Ubuntu
## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest
# UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.9.3-linux3/GitHubDesktop-linux-2.9.3-linux3.deb
### Uncomment below line if you have not installed gdebi-core before
# sudo apt-get install gdebi-core
sudo gdebi GitHubDesktop-linux-2.9.3-linux3.deb
# UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81
@MadiNaf
MadiNaf / .zshrc
Created October 23, 2021 05:27 — forked from zanshin/.zshrc
My .zshrc file
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"

Pre-requeste

  • An Github account
  • Existing repository in Github

Generate key

First if you do not have a .ssh folder you can create one in this path (You can choose the folder that you want)
exp : c/Users/Username/.ssh

Then open terminal an run:
$ ssh-keygen keyname

@MadiNaf
MadiNaf / Random-string
Created March 12, 2021 16:15 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@MadiNaf
MadiNaf / git_tips.md
Last active March 30, 2021 17:19
Git_Snippet

Selecte branch:

$ git checkout branch-name

Rename branch:

$ git branch -m new-name

If you want to see all of your local branches:

$ git branch --list

You can also rename a local branch from another branch by using the following two commands:

@MadiNaf
MadiNaf / noeh.ts
Created June 10, 2020 12:56
ts_legacy.ts
interface FourLegs{
readonly fourLegs: true;
}
interface Black{
readonly black: true;
}
class Animals {
moew: boolean;
@MadiNaf
MadiNaf / data.js
Created December 18, 2018 21:46
TO DO LIST WITH VUE JS
var data = {
dreamTeam: {
1: { name: 'Jerôme' },
2: { name: 'Mathieu' },
3: { name: 'Julien' },
4: { name: 'Etienne' }
},
columns: {
1: { title: 'todo', order: 1 },
@MadiNaf
MadiNaf / matrix-RegEX.txt
Last active November 30, 2018 10:27
REGEX
/( [A]{1}. )/
/(\d{2}\/\d{2}\/\d{4})/
/( \d{1}\/\d{2})/
/([a-zA-Z]{14,})/
/([a-zA-Z]{5}:\/\/w{3}.[a-zA-Z]{4}.[a-zA-Z]{3}\/[a-zA-Z]{5}\/t{2}[\d]{7})/
@MadiNaf
MadiNaf / crud_request.sql
Last active June 10, 2020 12:45
SQL & MySQL
--SELECTIONNER DES DONNEES DANS UNE BASE DE DONNEES
SELECT * FROM movie;
SELECT name FROM movie;
SELECT id, poster FROM movie;
SELECT poster, comment as movie_comment FROM movie;
--INSERER DES DONNER DANS UNE BASE DE DONNEES
INSERT INTO movie VALUES (null, "Full Metal Jacket", "https://en.wikipedia.org/wiki/Full_Metal_Jacket", "Full Metal Jacket is a 1987 war film directed, co-written, and produced by Stanley Kubrick and starring Matthew Modine, R. Lee Ermey, Vincent D'Onofrio and Adam Baldwin. The screenplay by Kubrick, Michael Herr, and Gustav Hasford was based on Hasford's novel The Short-Timers (1979). The storyline follows a platoon of U.S.");
INSERT INTO movie (name, poster, comment) VALUES ("La Naissance d'un empire", "https://fr.wikipedia.org/wiki/300_:_La_Naissance_d%27un_empire", "300 : La Naissance d'un empire (300: Rise of an Empire) est un péplum américain de Noam Murro, sorti au cinéma le 5 mars 2014. Il s'agit à la fois d'une préquelle et d'une suite de 300, l'action se passant à la fois avant
@MadiNaf
MadiNaf / index.html
Created November 6, 2018 15:59
JavaScript Base
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>JS Base Quest</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>