Skip to content

Instantly share code, notes, and snippets.

@yellow1912
yellow1912 / SES error
Created November 4, 2019 12:12
message.json
{
["Source"]=>
string(19) "no-reply@verifieddomain.com"
["Destination"]=>
array(1) {
["ToAddresses"]=>
array(1) {
[0]=>
string(28) "someone@gmail.com"
}
@yellow1912
yellow1912 / sample.js
Created September 23, 2019 13:44
Sample closure output
(function(b) {
b.ready(function() {
for (var d = b.querySelectorAll(".nl-widget-sleek-form-contact"), c = 0; c < d.length; c++) {
var a = b.querySelector("form", d[c]);
b.addEventListener(a, "submit", function(a) {
console.log("a");
b.querySelector("button", a.target).setAttribute("disabled", "disabled");
});
var e = ni.provider.get("service").get("event");
a = ni.provider.get("const").get("plugin.form.events").SUBMIT_DONE.replace("%s", a.getAttribute("data-form-id"));
@yellow1912
yellow1912 / sample.js
Created September 23, 2019 13:41
sample webpack result
(function(){'use strict';
(function(f) {
function c(a) {
if (e[a]) {
return e[a].exports;
}
var b = e[a] = {i:a, l:!1, exports:{}};
f[a].call(b.exports, b, b.exports, c);
b.l = !0;
return b.exports;
@yellow1912
yellow1912 / sample.js
Last active September 23, 2019 13:41
sample js code
(function (nu) {
nu.ready(function () {
var elements = nu.querySelectorAll('.nl-widget-sleek-form-contact');
for (var i=0; i < elements.length; i++) {
var form = nu.querySelector('form', elements[i]);
nu.addEventListener(form, 'submit', function (e) { console.log('a');
nu.querySelector('button', e.target).setAttribute('disabled', 'disabled');
});
abraham/twitteroauth dev-master 9350ad1 The most popular PHP library for use with the Twitter OAuth REST API.
aws/aws-sdk-php 3.112.0 AWS SDK for PHP - Use Amazon Web Services in your PHP project
beberlei/doctrineextensions v1.2.3 A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.
behat/gherkin v4.6.0 Gherkin DSL parser for PHP 5.3
behat/transliterator v1.2.0 String transliterator
cloudflare/sdk dev-master 9b97389 PHP binding for v4 of the Cloudflare Client API.
clue/stream-filter v1.4.1 A simple and modern approach to stream filtering in PHP
codeception/codeception 3.1.1 BDD-style testing framework
codeception/phpunit-wrapper 8.0.4 PHPUnit classes used by Codeception
code
@yellow1912
yellow1912 / vuejs
Created July 19, 2019 11:30
vuejs isotppe
<template>
<isotope ref="cpt" class="row q-col-gutter-sm" :options='options' :list="list">
<div v-for="(item,index) in list" class="q-pt-none" v-bind:class="{ 'col-7': (index == 0 || index == 1), 'col-5': (index == 2 || index == 3) }" :key="index">
<span hidden class="id">{{ item.id }}</span>
<q-card rounded class="q-mb-4">
<q-img :src="item.image" :ratio="item.ratio" />
</q-card>
</div>
</isotope>
</template>
@yellow1912
yellow1912 / log
Created July 17, 2019 14:22
ssl error
odfe-node1 | javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
odfe-node1 | at sun.security.ssl.Alert.createSSLException(Alert.java:128) ~[?:?]
odfe-node1 | at sun.security.ssl.Alert.createSSLException(Alert.java:117) ~[?:?]
odfe-node1 | at sun.security.ssl.TransportContext.fatal(TransportContext.java:308) ~[?:?]
odfe-node1 | at sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:279) ~[?:?]
odfe-node1 | at sun.security.ssl.TransportContext.dispatch(TransportContext.java:181) ~[?:?]
odfe-node1 | at sun.security.ssl.SSLTransport.decode(SSLTransport.java:164) ~[?:?]
odfe-node1 | at sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:672) ~[?:?]
odfe-node1 | at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:627) ~[?:?]
odfe-node1 | at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:443) ~[?:?]
@yellow1912
yellow1912 / custom-elasticsearch.yml
Created July 14, 2019 13:40
custom elasticsearch config for open distro
opendistro_security.ssl.transport.pemcert_filepath: esnode.pem
opendistro_security.ssl.transport.pemkey_filepath: esnode-key.pem
opendistro_security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
opendistro_security.ssl.transport.enforce_hostname_verification: false
#opendistro_security.ssl.http.enabled: true
opendistro_security.ssl.http.pemcert_filepath: esnode.pem
opendistro_security.ssl.http.pemkey_filepath: esnode-key.pem
opendistro_security.ssl.http.pemtrustedcas_filepath: root-ca.pem
opendistro_security.allow_unsafe_democertificates: true
opendistro_security.allow_default_init_securityindex: true
@yellow1912
yellow1912 / docker-compose.yml
Created July 14, 2019 13:35
docker compose for open distro with 1 single node
version: '3'
services:
odfe-node1:
image: amazon/opendistro-for-elasticsearch:1.0.1
container_name: odfe-node1
environment:
# - cluster.name=odfe-cluster
- node.name=odfe-node1
- discovery.type=single-node
# - discovery.seed_hosts=odfe-node1,odfe-node2
@yellow1912
yellow1912 / gist:43e4009e0384426ccfa017feb0eedcc9
Created December 5, 2018 03:07
Sample unserialize issue code for 7.3
a:4:{i:0;O:38:"Myrepo\AccountBundle\Model\LiteAccount":24:{s:8:"*roles";a:2:{i:0;s:23:"ROLE_MYREPO_SUPER_ADMIN";i:1;s:25:"ROLE_MYREPO_DEFAULT_ADMIN";}s:11:"*username";s:14:"full@gmail.com";s:20:"*usernameCanonical";s:14:"full@gmail.com";s:8:"*email";s:14:"full@gmail.com";s:17:"*emailCanonical";s:14:"full@gmail.com";s:7:"*salt";s:31:"izf39uqo4g00owcgwc04gko4ss0kscs";s:11:"*password";s:88:"4VtNLMaU0bkQ00G41AnkdfxQVAZTXvFgDSHxjVz/nHmhk/S2pZISejVavzuWEPydvekx4xkB4jVwWLWEiE8ORA==";s:18:"*currentPassword";N;s:16:"*plainPassword";N;s:20:"*confirmationToken";N;s:12:"*readGuide";b:0;s:12:"*lastLogin";O:8:"DateTime":3:{s:4:"date";s:26:"2018-12-05 10:05:24.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Asia/Krasnoyarsk";}s:20:"*passwordRequested";N;s:20:"*accountRegistered";i:0;s:17:"*accountExpired";N;s:16:"*accountLocked";N;s:21:"*credentialsExpired";N;s:8:"*party";O:34:"Myrepo\PartyBundle\Model\LiteParty":42:{s:11:"*resource";s:0:"";s:8:"*email";N;s:9:"*avatar";N;s:8:"*roles";N;s:10:"*account";N;s:11:"*contact