Instantly share code, notes, and snippets.
0xae /nginx-reverse-proxy.conf
CreatedAugust 8, 2019 17:04
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
server { | |
server_name my.api.com ; | |
location / { | |
proxy_pass http://localhost:5000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; |
0xae /website.com
CreatedFebruary 21, 2019 14:49
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
# Default server configuration | |
server { | |
root /var/www/99app.xbtfinex.com/; | |
# Add index.php to the list if you are using PHP | |
index index.html index.htm index.nginx-debian.html; | |
server_name 99app.xbtfinex.com; | |
location / { |
0xae /json_q3.js
CreatedMay 6, 2015 14:20
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
{"groups":{"Q3":[{"Q301_ID_01":"8","Q301_ID_02":"82","Q301_ID_03":"821","Q301_ID_04":"821004","Q301_ID_05":"8210041","Q301_ID_06":"8210040011","Q301_ID_07":"14.964651","Q301_ID_08":"-24.47398","Q301_ID_RAIO_ACAO":"","Q301_ID_09":"8210040011001","Q301_ID_10":1,"Q301_ID_11":7,"Q301_ID_12":"16-04-2015","Q301_ID_13":"29-04-2015","Q301_ID_14":"20-04-2015","Q302_IN_01":"1","Q302_IN_02":4,"Q302_IN_03":"1","Q302_IN_04":"","Q302_IN_05":2,"Q302_IN_06":"1","Q302_IN_07":"1","Q302_IN_08":"","Q303_IN_09":"1","Q302_IN_10":"1","Q302_IN_11":"2","Q302_IN_12":"1","Q302_IN_13":"","Q302_IN_14":"1","Q302_IN_15":"","Q302_IN_16":"3","Q302_IN_18":"2","Q302_IN_19":"2","Q302_IN_20":"2","Q302_IN_21":"1","Q302_IN_22":"3","Q302_IN_23":"3","Q302_IN_24":"1","Q302_IN_25":"","Q302_IN_26":"","Q302_IN_27":"","Q302_IN_28":"","Q302_IN_29":"2","Q302_IN_30":"","Q302_IN_31":"","Q302_IN_32":12000,"Q302_IN_33":"2","Q302_IN_34":"","Q303_AT_01":"1","Q303_AT_02":"1","Q303_AT_03":1,"Q303_AT_04":"2","Q303_AT_05":"2","Q303_AT_06":"2","Q303_AT_07":"1","Q303_ |
0xae /request1.js
CreatedMarch 26, 2015 17:47
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
POST http://inqueritos.ine.cv/survey/object/Q4 | |
{ | |
"errorType":"error", | |
"errors":[ | |
"Data é invalida 16/12/14 para o campo Data Inicio Ciclo.", | |
"Data é invalida 29/12/14 para o campo Data Fim Ciclo." | |
], | |
"id":0 | |
} |
0xae /save_beginning.js
CreatedMarch 25, 2015 12:50
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
varedificio=$stateParams.idEdificio; | |
varalojamento=$stateParams.idAlojamento; | |
varagregado=$stateParams.idAgregado; | |
varchave="RGA::agregado::"+edificio+"."+alojamento+"."+agregado; | |
$localForage.getItem(chave).then( | |
function(data){ | |
$scope.data=data; | |
} | |
); |
0xae /prepare_section.js
CreatedMarch 24, 2015 09:51
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
MapAttrsToGroups :function(section){ | |
vardefer=$q.defer(); | |
varmerged=[]; | |
varcache_groups={}; | |
varelements=section.attr.elements; | |
for(vari=0;i<elements.length;i++){ | |
varfield=elements[i]; | |
if(!field.attr.group.id){ | |
merged.push(field); |
0xae /save_alojamento.js
CreatedMarch 23, 2015 11:08
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
$scope.save=function(data){ | |
_prepareSectionToSave(data); | |
vari=data.attr.agregados||0; | |
varagregados=parseInt(data.attr.elements[6].attr.value); | |
$localForage.getItem("51::fields").then( | |
function(agregadoQuest){ | |
varconf=agregadoQuest[0]; | |
for(;i<agregados;i++){ | |
varagregadoQuestChave="RGA::agregado::"+edificio+"."+alojamento+"."+(i+1); |
0xae /sync_button.html
CreatedMarch 20, 2015 15:30
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
<spanclass="item-note"> | |
<!-- {{sample.values[5]}} --> | |
<buttonclass="button button-clear"ng-class="sample.sync ? 'button-balanced' : 'button-assertive'"style="min-height:21px;"ng-click="syncData(e);"> | |
<iclass="icon ion-paper-airplane"></i> | |
</button> | |
</span> |
0xae /clean_alojamentos.js
Last activeAugust 29, 2015 14:17
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
// Reset Alojamentos | |
$localForage.keys().then(function(keys){ | |
keys.forEach(function(k){ | |
if(k.indexOf("RGA::agregado::")!=-1||k.indexOf("RGA::alojamento::")!=-1) | |
$localForage.removeItem(k) | |
}) | |
}) | |
// Reset Samples |
0xae /alojamentoCtrl.js
CreatedMarch 20, 2015 11:26
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
app.controller("AlojamentoCtrl",function($q,$scope,$localForage,$stateParams){ | |
$scope.alojamentos=[]; | |
varid=$stateParams.idEdificio; | |
$scope.edificio=id; | |
$localForage.keys().then( | |
function(chaves){ | |
varprefixo="RGA::alojamento::"+id+"."; | |
varary=[]; | |
for(vari=0;i<chaves.length;i++){ |
NewerOlder