Skip to content

Instantly share code, notes, and snippets.

View Ekliptor's full-sized avatar

Ekliptor

View GitHub Profile
@ksafranski
ksafranski / Common-Currency.json
Last active July 18, 2024 07:42
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@michaljemala
michaljemala / tls-client.go
Last active July 18, 2024 11:40
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)
@bUxEE
bUxEE / find_string.php
Last active July 11, 2024 18:08
find string in file (search in directory and subdirectories) php
<?php
$string = 'stringToSearch';
$dir = new RecursiveDirectoryIterator('folder');
foreach (new RecursiveIteratorIterator($dir) as $filename => $file) {
//$thename = $file->getFilename(); //uncomment this line and next to print names of all files scanned
//echo $thename.'<br />';
$content = file_get_contents($file->getPathname());
if (strpos($content, $string) !== false) {
@heaversm
heaversm / twilio-transcription-back.js
Last active January 14, 2023 11:04
Twilio Call Recording Transcriptions With Google Web Speech API
//node vars
const express = require('express')
const twilio = require('twilio')
const request = require('request')
//twilio vars
const accountSid = '###' //your twilio account SID
const authToken = "###" //your twilio auth token
const client = require('twilio')(accountSid, authToken)
const baseURL = 'https://api.twilio.com/2010-04-01/Accounts/[YOUR_ACCOUNT_HERE]/Recordings/'
@blaskovicz
blaskovicz / template.html
Created June 30, 2017 18:01
Golang template features (nested variables, range over array, index into map, conditionals)
<div class="levels">
{{ $groups := .LevelGroups }}
{{ $groupedLevels := .Levels }}
{{ $completeLevels := .CompleteLevels }}
{{ if $groupedLevels }}
{{ range $group := $groups }}
<div class="intro"><h2>{{$group}}</h2></div>
{{ range index $groupedLevels $group }}
<a href="/level/{{.Number}}" class="{{if index $completeLevels .Number}}complete{{end}}">
<span class="level">{{.Number}} </span>
@abrkn
abrkn / drivechain.ai.md
Created October 22, 2018 10:42
Drivechain.ai

Drivechain.ai

The following toolkit makes getting started with Drivechain TestDrive easier and more fun!

Services

@bitjson
bitjson / 0_cashchannels.md
Last active September 28, 2023 13:53
CashChannels: Recurring Payments for Bitcoin Cash
@inthestatic
inthestatic / delta-hedge.py
Last active January 22, 2023 11:19
Minimalist delta hedging script for Deribit
import requests
import json
from time import sleep
from datetime import datetime
#settings
delta_band = .1 # how far can account delta drift from 0 either up or down
repeat_seconds = 5 # how often should the script loop to check for delta
delta_bias = 1 # 0=no bias, >0 positive price bias ok with additional BTC exposure