This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Used to calculate the checksum | |
# http://fr.wikipedia.org/wiki/Relev%C3%A9_d'identit%C3%A9_op%C3%A9rateur | |
# | |
exports.calcChksm = (oo, q, rrrrrr, notel) -> | |
concatenation = "#{oo}#{q}#{rrrrrr}#{notel}" | |
ordre = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+" | |
a = b = c = 0 | |
for i in concatenation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quoted in http://ww.zenithar.org/2012/04/06/iced-coffeescript-minification/ | |
# Based on https://github.com/jashkenas/coffee-script/wiki/%5BExtensibility%5D-Hooking-into-the-Command-Line-Compiler | |
# | |
# Don't forget to install UglifyJS | |
# npm install -g uglify-js | |
# | |
# CoffeeScript = require 'coffee-script' | |
CoffeeScript = require 'iced-coffee-script' | |
{parser, uglify} = require 'uglify-js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crypto = require("crypto") | |
# | |
# Hashing algorithm conform to Owasp. | |
# https://www.owasp.org/index.php/Hashing_Java | |
# | |
exports.secureHash = (algorithm, key, message, iterations) -> | |
hash = crypto.createHash(algorithm) | |
hmac = crypto.createHmac(algorithm, key) | |
buf = hash.update(key).digest() + message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyCollection = require 'models/mycollections' | |
MyModel = require 'models/mymodel' | |
m1 = new MyModel({id: 1, label: 'tata'}) | |
m2 = new MyModel({id: 14, label: 'tete'}) | |
m3 = new MyModel({id: 2, label: 'titi'}) | |
col = new MyCollection() | |
col.add m1 | |
col.add m2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('util'), | |
fs = require('fs'), | |
rest = require('restler'), | |
async = require('async'), | |
_ = require('underscore'), | |
BASEURL = "http://localhost:8080/icescrum/ws/p/", | |
SPRINTID = 1, | |
PRJKEY = "PRJ1"; | |
IceScrum = rest.service(function(u, p) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BackendMessageConverter extends ProtobufMessageConverter { | |
public BackendMessageConverter() { | |
// Server object is the object generated by protoc | |
super(Server.getDescriptor()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.atmosphere.interceptors; | |
import org.atmosphere.cpr.*; | |
public class CORSAtmosphereInterceptor implements AtmosphereInterceptor { | |
@Override | |
public void configure(AtmosphereConfig config) { | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.zenithar.restexpress.config; | |
import com.strategicgains.restexpress.Format; | |
import com.strategicgains.restexpress.RestExpress; | |
import com.strategicgains.restexpress.util.Environment; | |
import org.apache.commons.fileupload.FileUpload; | |
import org.apache.commons.fileupload.disk.DiskFileItemFactory; | |
import org.apache.commons.io.FileCleaningTracker; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM scratch | |
LABEL maintainer="Thibault NORMAND <[email protected]>" \ | |
docker.from="scratch" \ | |
built.on="ubuntu 19.04" \ | |
hardened.flags="true" \ | |
description="Nginx built from source" \ | |
ssl.implementation="boringssl" \ | |
boringssl.version="master" \ | |
pcre.version="8.43" \ |
OlderNewer