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 root = "./assets"; | |
var publicPath = "./public/assets"; | |
var cssPath = publicPath + "/css/"; | |
var jsPath = publicPath + "/js/"; | |
var htmlDevelopmentFiles = ['./app/views/**/*.html']; | |
var sass = { | |
source: root + '/css/', | |
dest: cssPath, | |
pattern: "**/*.scss" |
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
/** | |
* Interfaz para acceder a notificaciones desktop | |
* | |
* DesktopNotification.$show("Hey", { | |
* body: `you have ${totalDisplayed} tasks to do`, | |
* icon: '/yourlogo.png' | |
* }); | |
* @author Daniel Vera Morales | |
*/ | |
export class DesktopNotification { |
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
import { JSONType } from "./IJsonType"; | |
/** | |
* Filtra un resultado de modo que se pueda modificar. | |
*/ | |
export class SimpleFilter<K> { | |
protected filters: JSONType<K, (data) => any>; | |
constructor() { | |
this.filters = new JSONType<K, (data) => any>(); | |
} |
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
import math | |
import base64 | |
import functools | |
text="hola"; | |
base=len(text); | |
acum=[]; | |
for x in text: | |
mychr=math.log(ord(x), base); | |
encoded=str(mychr); | |
enc2=""; |
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
#!/usr/bin/env bash | |
container="gitlab"; | |
base="PATH_TO_YOUR_HOME/gitlab"; | |
config=$base"/config"; | |
logs=$base"/log"; | |
data=$base"/data"; | |
docker run --detach --publish 443:443 --publish 8580:80 --publish 8522:22 --name $container --restart always --volume $config:/etc/gitlab --volume $logs:/var/log/gitlab --volume $data:/var/opt/gitlab gitlab/gitlab-ce:latest |
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 anyp; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Properties; | |
import java.util.Set; | |
import org.codehaus.jackson.JsonGenerationException; | |
import org.codehaus.jackson.map.JsonMappingException; | |
import org.codehaus.jackson.map.ObjectMapper; |
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
class FooTest { | |
/** | |
* Sequence saving | |
*/ | |
public static SequenceJunitRule sequences = new SequenceJunitRule(); | |
/** | |
* Restore the sequences on Class DIE. | |
*/ | |
@AfterClass | |
public static void tearDownClass() { |
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
// Define new methods, function helper | |
Function.method = function(name, fx) { | |
this.prototype[name] = fx; | |
}; | |
// Define curry method | |
Function.method("curry", function() { | |
const slice = Array.prototype.slice; | |
const args = slice.apply(arguments); | |
const that = this; |
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
function createMethod(name: string, value: string, parent, theContext) { | |
const getter = function() { | |
parent.endpoint = value; | |
return parent.endpoint; | |
}; | |
Object.defineProperty(theContext, name, { | |
get: getter, | |
enumerable: true, | |
configurable: true |
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
ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |