Merge branch 'master' into feature/reorganize
Conflicts: .gitignore
This commit is contained in:
		
						commit
						c78d928805
					
				
					 3 changed files with 171 additions and 0 deletions
				
			
		
							
								
								
									
										78
									
								
								.gitlab-ci.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								.gitlab-ci.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,78 @@ | |||
| #variables: | ||||
| #  NPMPATH: "node_modules/.bin" | ||||
| 
 | ||||
| stages: | ||||
| #  - build | ||||
| #  - cleanup_build | ||||
|   - deploy | ||||
| #  - cleanup | ||||
| 
 | ||||
| .run_deploy: &run_deploy | ||||
|   script: | ||||
|     - chmod +x ./deploy.sh | ||||
|     - ./deploy.sh | ||||
| 
 | ||||
| #build_job: | ||||
| #  stage: build | ||||
| #  script: | ||||
| #    - npm install | ||||
| #    - $NPMPATH/bower install | ||||
| #    - $NPMPATH/grunt | ||||
| #  tags: | ||||
| #    - javascript | ||||
| #  except: | ||||
| #    - tags | ||||
| #  artifacts: | ||||
| #    paths: | ||||
| #      - dist/*.min.* | ||||
| #      - info/ | ||||
| #      - resources/ | ||||
| #      - index.html | ||||
| #      - manifest.appcache | ||||
| 
 | ||||
| #cleanup_build_job: | ||||
| #  stage: cleanup_build | ||||
| #  script: | ||||
| #    - rm -rf node_modules | ||||
| #    - rm -rf bower_components | ||||
| #    - rm -rf dist | ||||
| #  when: on_failure | ||||
| 
 | ||||
| develop: | ||||
|   stage: deploy | ||||
|   <<: *run_deploy | ||||
|   environment: develop | ||||
|   except: | ||||
|     - tags | ||||
|     - master | ||||
|     - develop | ||||
|   variables: | ||||
|     ENVIRON: develop | ||||
|     TARGET: $WWW_DEPLOY_ROOT_DEVELOP | ||||
| 
 | ||||
| staging: | ||||
|   stage: deploy | ||||
|   <<: *run_deploy | ||||
|   environment: staging | ||||
|   only: | ||||
|     - develop | ||||
|   variables: | ||||
|     ENVIRON: staging | ||||
|     TARGET: $WWW_DEPLOY_ROOT_STAGING | ||||
| 
 | ||||
| production: | ||||
|   stage: deploy | ||||
|   <<: *run_deploy | ||||
|   environment: production | ||||
|   only: | ||||
|     - master | ||||
|   variables: | ||||
|     ENVIRON: production | ||||
|     TARGET: $WWW_DEPLOY_ROOT_PRODUCTION | ||||
| 
 | ||||
| #cleanup_job: | ||||
| #  stage: cleanup | ||||
| #  script: | ||||
| #    - rm -rf node_modules | ||||
| #    - rm -rf bower_components | ||||
| #  when: always | ||||
							
								
								
									
										68
									
								
								dencode.js
									
										
									
									
									
								
							
							
						
						
									
										68
									
								
								dencode.js
									
										
									
									
									
								
							|  | @ -99,6 +99,40 @@ | |||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "hextodec", | ||||
| 			"name": "Decode hex as decimal", | ||||
| 			"convert": function (input) { | ||||
| 				try { | ||||
| 					return { | ||||
| 						"status": "OK", | ||||
| 						"content": parseInt(input, 16).toString(10) | ||||
| 					}; | ||||
| 				} catch (exception) { | ||||
| 					return { | ||||
| 						"status": "ERROR", | ||||
| 						"content": "Invalid number (integer) string." | ||||
| 					}; | ||||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "bintodec", | ||||
| 			"name": "Decode binary as decimal", | ||||
| 			"convert": function (input) { | ||||
| 				try { | ||||
| 					return { | ||||
| 						"status": "OK", | ||||
| 						"content": parseInt(input, 2).toString(10) | ||||
| 					}; | ||||
| 				} catch (exception) { | ||||
| 					return { | ||||
| 						"status": "ERROR", | ||||
| 						"content": "Invalid number (integer) string." | ||||
| 					}; | ||||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "base64encode", | ||||
| 			"name": "Encode Base64", | ||||
|  | @ -154,6 +188,40 @@ | |||
| 					"content": quotedPrintable.encode(utf8.encode(input)) | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "dectohex", | ||||
| 			"name": "Encode decimal as hex", | ||||
| 			"convert": function (input) { | ||||
| 				try { | ||||
| 					return { | ||||
| 						"status": "OK", | ||||
| 						"content": parseInt(input).toString(16) | ||||
| 					}; | ||||
| 				} catch (exception) { | ||||
| 					return { | ||||
| 						"status": "ERROR", | ||||
| 						"content": "Invalid number (integer) string." | ||||
| 					}; | ||||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "dectobin", | ||||
| 			"name": "Encode decimal as binary", | ||||
| 			"convert": function (input) { | ||||
| 				try { | ||||
| 					return { | ||||
| 						"status": "OK", | ||||
| 						"content": parseInt(input).toString(2) | ||||
| 					}; | ||||
| 				} catch (exception) { | ||||
| 					return { | ||||
| 						"status": "ERROR", | ||||
| 						"content": "Invalid number (integer) string." | ||||
| 					}; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	]; | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										25
									
								
								deploy.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								deploy.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| #!/bin/sh | ||||
| 
 | ||||
| declare destination | ||||
| case "${TARGET}" in | ||||
| 	"${WWW_DEPLOY_ROOT_DEVELOP}") | ||||
| 		destination="${TARGET}/${CI_BUILD_REF_NAME}" | ||||
| 		;; | ||||
| 	"${WWW_DEPLOY_ROOT_STAGING}"|"${WWW_DEPLOY_ROOT_PRODUCTION}") | ||||
| 		destination="${TARGET}" | ||||
| 		;; | ||||
| 	*) | ||||
| 		echo "Invalid TARGET specified. Aborting deployment." | ||||
| 		exit 1 | ||||
| 		;; | ||||
| esac | ||||
| 
 | ||||
| if [[ ! -d "${destination}" ]] ; then | ||||
|     mkdir -p "${destination}" || echo "Failed to create target directory for deployment!" | ||||
| fi | ||||
| 
 | ||||
| rm -rf "${destination}/*" | ||||
| rm -rf "${destination}/.??*" | ||||
| cp -a dencode.css dencode.js index.html quoted-printable.js utf8.js "${destination}" | ||||
| 
 | ||||
| echo "Deployment successful." | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue