This file contains hidden or 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
<?php | |
/** | |
* This class can add WSSecurity authentication support to SOAP clients | |
* implemented with the PHP 5 SOAP extension. | |
* | |
* It extends the PHP 5 SOAP client support to add the necessary XML tags to | |
* the SOAP client requests in order to authenticate on behalf of a given | |
* user with a given password. | |
* |
This file contains hidden or 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
using System; | |
using System.IdentityModel.Tokens; | |
using System.Security.Claims; | |
using System.Security.Cryptography; | |
namespace CreateValidateJWT | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains hidden or 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
PASSWORD | |
changethis | |
SERVER KEYSTORE - used by the server to establish a secure connection (HTTPS) | |
c:\eclipse\jdk1.7.0_05\jre\bin\keytool.exe -genkey -keyalg RSA -alias localhost -keystore localhost.jks -validity 365 -keysize 2048 | |
CLIENT KEYSTORE - used to generate ".cer" file that wil be used in the server's trustore and in the browser to identify the client with the server | |
c:\eclipse\jdk1.7.0_05\jre\bin\keytool.exe -genkey -keyalg RSA -alias jonwelzel -keystore jonwelzel.jks -validity 365 -keysize 2048 |
This file contains hidden or 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
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="React Routes" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /> | |
</conditions> |
This file contains hidden or 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Launch Chrome against localhost", | |
"url": "http://localhost:4200", | |
"sourceMaps": true, | |
"webRoot": "${workspaceRoot}/my-own-app" |
This file contains hidden or 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
namespace YourNamespace | |
{ | |
/// <summary> | |
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine | |
/// the association between the name of the column in the query results and the member to | |
/// which it will be extracted. If no column mapping is present all members are mapped as | |
/// usual. | |
/// </summary> | |
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam> | |
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper |
This file contains hidden or 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
// Fonte dos municípios: https://pt.wikipedia.org/wiki/Lista_de_munic%C3%ADpios_do_Brasil | |
$('table tbody > tr > td > ul > li').each(function(index, element) { | |
pattern = /([\s\S]*)(\([A-Za-z]{2}\))/; | |
text = $(this).text(); | |
result = text.match(pattern); | |
result.forEach(function (e, i, a) { a[i] = a[i].trim(); }); | |
console.log('INSERT INTO Municipio (Nome, Estado) VALUES (\'' + result[1] + '\', \'' + result[2].replace(/(\()(\w+)(\))/, '$2') + '\');'); | |
}); |
This file contains hidden or 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
<?php | |
if (function_exists("date_default_timezone_set")) { | |
date_default_timezone_set("UTC"); | |
} | |
function simple() { | |
$a = 0; | |
for ($i = 0; $i < 1000000; $i++) | |
$a++; |
This file contains hidden or 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
<?php | |
use ReckiCT\Jit; | |
if (function_exists('class_alias')) { | |
// HippyVM doesn't have a class_alias, so this will break things. | |
require __DIR__ . '/../vendor/autoload.php'; | |
} | |
define("IM", 139968); |
This file contains hidden or 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
<?php | |
/** | |
* CI3 flat file session driver used for testing with Codeception | |
*/ | |
/** | |
* Class CI_Session_codeception | |
*/ | |
class CI_Session_codeception extends CI_Session_driver |
NewerOlder