In the root of your project, add .gitlab-ci.yml with the configuration below.
image: node:latest
stages:| syntax enable | |
| colorscheme desert | |
| "-------------General Settings--------------" | |
| set backspace=indent,eol,start "Make backspace behave like every other editor. | |
| let mapleader = ',' "The default leader is \, but a comma is much better. | |
| set number "Let's activate line numbers. |
| <?php | |
| // Updated 2018-01-24 to work with google/apiclient:^2.0 | |
| /* | |
| * Easiest to use composer to install google-api-php-client and generate autoloader | |
| * If you dont want to use composer you can manually include any needed files | |
| */ | |
| include_once 'vendor/autoload.php'; | |
| /* | |
| * Email address for admin user that should be used to perform API actions |
| package regression; | |
| import java.io.BufferedInputStream; | |
| import java.io.BufferedReader; | |
| import java.io.DataInputStream; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; |
System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories
| // set-up a connection between the client and the server | |
| var socket = io.connect(); | |
| // let's assume that the client page, once rendered, knows what room it wants to join | |
| var room = "abc123"; | |
| socket.on('connect', function() { | |
| // Connected, let's sign-up for to receive messages for this room | |
| socket.emit('room', room); | |
| }); |
| alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
This is a set of coding conventions and rules for use in JavaScript programming. It is inspired by the Sun document Code Conventions for the Java Programming Language. It is heavily modified of course because JavaScript is not Java.
The long-term value of software to an organization is in direct proportion to the quality of the codebase. Over its lifetime, a program will be handled by many pairs of hands and eyes. If a program is able to clearly communicate its structure and characteristics, it is less likely that it will break when modified in the never-too-distant future.
Code conventions can help in reducing the brittleness of programs.
All of our JavaScript code is sent directly to the public. It should always be of publication quality.
| <?php | |
| // Use in the "Post-Receive URLs" section of your GitHub repo. | |
| if ( $_POST['payload'] ) { | |
| shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
| } | |
| ?>hi |