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
{ | |
"resourceType": "Questionnaire", | |
"id": "1100199", | |
"identifier": [ { | |
"id": "1100-1234" | |
} ], | |
"version": "1", | |
"name": "quest1", | |
"title": "Mon Questionnaire", | |
"status": "draft", |
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
b64="..." | |
from base64 import b64decode | |
bytes=b64decode(b64, validate=True) | |
if bytes[0:4] != b'%PDF': | |
raise ValueError("PDF KO") | |
with open("file.pdf","wb") as fout: | |
fout.write(bytes) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>test</title> | |
</head> | |
<script> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<transformation> | |
<info> | |
<name>test_inc</name> | |
<description/> | |
<extended_description/> | |
<trans_version/> | |
<trans_type>Normal</trans_type> | |
<trans_status>0</trans_status> | |
<directory>/</directory> |
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
# gitlab-rails console production | |
irb(main):016:0> user=User.find_by(username:"bob") | |
irb(main):017:0> user.projects_limit=100 | |
irb(main):018:0> user.save |
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 | |
echo "\n Delete old index" | |
curl -XDELETE 'http://localhost:9200/teams' | |
# Create index with default mappings | |
#curl -XPUT 'http://localhost:9200/teams' | |
# Create index with explicit mapping for nested element | |
curl -XPUT 'http://localhost:9200/teams' -d'{ |
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 | |
echo "\n Delete old index" | |
curl -X DELETE 'http://localhost:9200/units | |
curl -XPUT 'http://localhost:9200/units' | |
echo "\n Add documents" | |
curl -XPUT 'http://localhost:9200/units/unit/123' -d '{ |
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
angular.module('bDatepicker', []). | |
directive('bDatepicker', function(){ | |
return { | |
require: '?ngModel', | |
restrict: 'A', | |
link: function($scope, element, attrs, ngModelCtrl) { | |
var originalRender, updateModel; | |
updateModel = function(ev) { | |
return $scope.$apply(function() { | |
return ngModelCtrl.$setViewValue(ev.date); |