Skip to content

Instantly share code, notes, and snippets.

@leg0ffant
Created December 26, 2015 08:22
Show Gist options
  • Save leg0ffant/786c2df95a06e18cfbaf to your computer and use it in GitHub Desktop.
Save leg0ffant/786c2df95a06e18cfbaf to your computer and use it in GitHub Desktop.

Build command multi-language - A Le Goff

Script bash executable

http://www.zsh.org/

$ chmod +x monScript.sh
$ ./monScript.sh

Compile & Install programm [code source]

https://www.gnu.org/software/make/

$ ./configure && make && sudo make install

Utilisation de l'utilitaire make dans le code source via Makefile, programmation en C, C++

Compiler en C simplement

https://gcc.gnu.org/

$ gcc -o programme1 programme1.c
./programme1

Utilisation du compilateur gcc

Construire programme en Go

https://golang.org/ Compile et test dans dossier src (code source) via:

$ go build hello.go
$./hello

Installer le package et fichier binaire (bin) Installer package créer le dossier dans src puis

$ go install hello
$ hello

Lancer programme Ruby

https://www.ruby-lang.org/

$ ruby programme3.rb

Création projet Rails

https://rvm.io/

Après configuration de RVM et installation gem rails

$ mkdir projet_rails
$ cd projet_rails
$ rails new mon_apps
$ cd mon_apps
$ vim Gemfile # configuration dépendance gem
$ bundle install # installation et lecture Gemfile
$ rails server

Accès serveur local IP 127.0.0.1 localhost à l'adresse http://localhost:3000/

Serveur LEMP(Linux Nginx PHP-FPM Mariadb) apt-get

Suite complète dépendance utilisation serveur LEMP sur Debian (ubuntu, mint)
# Mise à jour base de paquet
$ apt-get update

# Installation sécurité
$ apt-get install iptables fail2ban

# Nétoyage serveur Apache et purge pour installation Nginx
$ apt-get purge sendmail* apache2* bind9 samba xinetd

# Nginx et librarie PHP5-FPM
$ atp-get install nginx php5 php5-fpm php5-cli php5-curl php5-gd php5-mcrypt php5-intl php5-mysql unzip bzr

# SQL Database MariaDB + keyring server
$apt-get install python-software-properties
$ apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
$ add-apt-repository 'deb <http://mirrors.supportex.net/mariadb/repo/10.0/debian> wheezy main'

$ apt-get update
$ apt-get install mariadb-server mariadb-client

Pelican Blog création

http://blog.getpelican.com/

Installation de python pour Pelican site statique et création projet

# Python dépendance et pip installer
sudo apt-get install python python-virtualenv python-pip

# Pelican déploiement
$ (sudo) pip install pelican
$ (sudo) pip install markdown

# Pelican installation
$ pelican-quickstart

Yaourt & AUR

https://www.archlinux.org/

Pacman basic

# Synchro base de donnée paquets
$ pacman -Syu

# Synchroniser clés PGP confiances dépots développeurs
$ pacman-key -init

Reflector mise à jour des dépots

# installation
$ pacman -S reflector

# sauvegarde ancien fichier et nouveau mirrorlist
$ cd /etc/pacman.d
$ cp mirrorlist mirrorlist.backup

# Mise à jour dépot 20 premiers mirroirs classé par plus rapide (HTTPS)
$ reflector -l 20 -f 5 --save /etc/pacman.d/mirrorlist

Yaourt basic et synchro de AUR

$ yaourt -Syu --aur

Docs wiki Archlinux en local

$ yaourt -S arch-wiki-docs arch-wiki-docs-fr

Octopress

http://octopress.org/

# Git clone
$ git clone git://github.com/imathis/octopress.git octopress
$ cd octopress

# Dependancies
$ gem install bundler
$ rbenv rehash    # If you use rbenv, rehash to be able to run the bundle command
$ bundle install

# Install
$ rake install

Hugo

http://gohugo.io/

Get Hugo release + Go language

# Git get from github
$ export GOPATH=$HOME/go
$ go get -v github.com/spf13/hugo

# Updtade depedencies
$ go get -u -v github.com/spf13/hugo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment