Skip to content

Instantly share code, notes, and snippets.

@tecnom1k3
tecnom1k3 / lights.php
Created October 11, 2021 22:28
color generator
<?php
// 3 ranges, values from 0 to 254 (0:ff) each
//cycle all possible values (0:0:0 to ff:ff:ff)
//we have N positions
// each position will get a color at a time
// position 0 = 0:0:0
// position 1 = 0:0:1
// ...
// position n-1 = color combination that is able to fit
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:microsoft-dynamics-schemas/page/tresa_currency" targetNamespace="urn:microsoft-dynamics-schemas/page/tresa_currency">
<types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:microsoft-dynamics-schemas/page/tresa_currency">
<xsd:simpleType name="Status">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_" />
<xsd:enumeration value="Processed" />
<xsd:enumeration value="Error" />
</xsd:restriction>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:microsoft-dynamics-schemas/nav/system/" targetNamespace="urn:microsoft-dynamics-schemas/nav/system/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:microsoft-dynamics-schemas/nav/system/">
<element name="Companies">
<complexType>
<sequence />
</complexType>
</element>
<element name="Companies_Result">
@tecnom1k3
tecnom1k3 / query.sql
Created February 24, 2018 00:50
get list of characters used in a database column (postgres)
select string_agg(c,'' order by c)
from (
select distinct regexp_split_to_table(lower(field),'') as c
from table1
) t
<?php
class TreeNode
{
public $value;
public $left;
public $right;
@tecnom1k3
tecnom1k3 / entropy.html
Created June 19, 2016 02:14
js get entropy mouse
<html>
<head>
<script language="javascript" src="js/jquery-1.5.1.min.js"></script>
<script language="javascript" src="js/jquery-ui-1.8.11.custom.min.js"></script>
<script language="javascript">
$(document).ready(function() {
var entropy='';
var charslength = 0;
var pct = 0;
var maxchars = 500;

Keybase proof

I hereby claim:

  • I am tecnom1k3 on github.
  • I am technomike (https://keybase.io/technomike) on keybase.
  • I have a public key whose fingerprint is 2808 DEAD 4877 2CB3 5CFE 5173 C488 A985 5F3A 67E5

To claim this, I am signing this object:

@tecnom1k3
tecnom1k3 / composer.json
Last active August 29, 2015 14:06
jwt php
{
"name": "technomike/jwt",
"authors": [
{
"name": "technomike",
"email": "tech@no.mi"
}
],
"require": {
"firebase/php-jwt": "*"
@tecnom1k3
tecnom1k3 / callback.php
Last active August 29, 2015 14:01
Guzzle oauth
<?php
session_start();
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Subscriber\Oauth\Oauth1;
use GuzzleHttp\Subscriber\Log\LogSubscriber;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use GuzzleHttp\Subscriber\Log\Formatter;