Skip to content

Instantly share code, notes, and snippets.

View yamen's full-sized avatar

Yamen Sader yamen

  • Sydney, Australia
View GitHub Profile
@yamen
yamen / 101Alpha_code_1.py
Created February 6, 2021 01:49 — forked from kangchihlun/101Alpha_code_1.py
101Alpha_code_1.py
import numpy as np
import pandas as pd
from numpy import abs
from numpy import log
from numpy import sign
from scipy.stats import rankdata
# region Auxiliary functions
def ts_sum(df, window=10):
"""
Verifying my Blockstack ID is secured with the address 1PfZ3w6rNnHg6H5eZDew2xKSBZQYtuwMjy https://explorer.blockstack.org/address/1PfZ3w6rNnHg6H5eZDew2xKSBZQYtuwMjy
@yamen
yamen / generate-certificate-chain.sh
Last active February 16, 2024 21:03
Generate a full self-signed certificate chain (Root -> Intermediate CA -> Server) using keytool, that can be used for 'localhost' development
#!/bin/bash
rm *.jks 2> /dev/null
rm *.pem 2> /dev/null
echo "===================================================="
echo "Creating fake third-party chain root -> ca"
echo "===================================================="
# generate private keys (for root and ca)
@yamen
yamen / keybase.md
Created December 1, 2014 23:39
keybase.md

Keybase proof

I hereby claim:

  • I am yamen on github.
  • I am yamen (https://keybase.io/yamen) on keybase.
  • I have a public key whose fingerprint is 61F6 AB17 BEC6 AE09 8624 087E AFAF 2CEE 5BA0 3AFF

To claim this, I am signing this object:

<spring:bean id="cassandraObjectStore" class="com.mulesoft.mule.cassandradb.CassandraDBObjectStore"
scope="singleton">
<spring:property name="host" value="cassandradb.acmesoft.com"/>
<spring:property name="port" value="9160"/>
<spring:property name="keyspace" value="MuleState"/>
<spring:property name="consistencyLevel" value="ALL"/>
<spring:property name="defaultPartitionName"
value="idempotentFlow_#[new java.text.SimpleDateFormat('yyyy_MM_dd').format(new Date())]"/>
</spring:bean>
@BeforeClass
public static void installLicense() throws Exception {
LicenseManager licenseManager = LicenseManagementFactory.getInstance()
.createLicenseManager(LicenseManagementFactory.MULE_EE);
MuleLicenseKey license = new MuleLicenseKey();
license.setLicenseKeyFile(MyFunctionalTestCase.class
.getResource("/test.lic").getPath());
licenseManager.install(license);
}
# Install Wine and other necessary components using Homebrew
brew install wine
brew install winetricks
brew install cabextract
# Instructions from http://www.sparxsystems.com/support/faq/enterprise-architect-WINE.html
winetricks allfonts
winetricks msxml
winetricks msxml3
winetricks msxml4
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
<xsl:param name="date">2013-11-04+11:00</xsl:param>
<xsl:param name="time">16:09:24.123+11:00</xsl:param>
<xsl:variable name="dateTime" select="concat($date,'T',$time)"/>
<xsl:template match="/">
<html>
<body>
<h1>Formatting Dates with XSLT 2.0</h1>
<p>Date: <xsl:value-of select="$date"/>
</p>
// no type declarations needed
// optional semicolins
// literal string syntax
def myList = ['Hello', 'World']
// easy STDOUT printing
// optional method parentheses
println myList
@yamen
yamen / LookupResult.java
Last active August 29, 2015 13:55
XRefService with LookupResult
package au.com.sixtree.common.services.xref;
import java.util.ArrayList;
import java.util.Collection;
import au.com.sixtree.common.services.xref.exceptions.UnexpectedResultsException;
public class LookupResult {
private ArrayList<String> _result;