package main
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
Discover gists
This file contains 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
# data: dictionary { 'dd/mm/yyy': price, 'dd/mm/yyyy': price, ... } | |
def relativeStrengthIndex(data, num): | |
if not isinstance(data, dict): | |
raise Exception('Dictionary input expected') | |
if not isinstance(num, int): | |
raise Exception('Integer input expected') |
This file contains 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
const axios = require('axios'); | |
async function getLocations() { | |
const locationsData = await axios.post("https://publicapi.txdpsscheduler.com/api/AvailableLocation", { | |
"TypeId": 71, | |
"ZipCode": "10001", | |
"CityName": "", | |
"PreferredDay": 0 | |
}); | |
return locationsData.data; | |
} |
This file contains 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
set(CMAKE_C_COMPILER clang) | |
set(CMAKE_CXX_COMPILER clang++) | |
cmake_minimum_required(VERSION 3.18) | |
set(APP_NAME "example-app") | |
project("${APP_NAME}") | |
set(CMAKE_CXX_STANDARD 20) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++20 -Wno-multichar") |
This file contains 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
.org $8000 | |
.org $ff00 | |
XAML = $24 ; Last "opened" location Low | |
XAMH = $25 ; Last "opened" location High | |
STL = $26 ; Store address Low | |
STH = $27 ; Store address High | |
L = $28 ; Hex value parsing Low | |
H = $29 ; Hex value parsing High | |
YSAV = $2A ; Used to see if hex value is given |
This file contains 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
'use strict' | |
// IMPORTANT: Replace environment variables with your current values | |
const aws = require('aws-sdk') | |
aws.config.region = process.env.REGION | |
const sts = new aws.STS({apiVersion: '2011-06-15'}) | |
module.exports.handler = (event, context, callback) => { | |
console.log('User email', event.queryStringParameters.email) |
This file contains 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
#!/usr/bin/env python | |
"""Extend Python's built in HTTP server to save files | |
curl or wget can be used to send files with options similar to the following | |
curl -X PUT --upload-file somefile.txt http://localhost:8000 | |
wget -O- --method=PUT --body-file=somefile.txt http://localhost:8000/somefile.txt | |
__Note__: curl automatically appends the filename onto the end of the URL so |
This file contains 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
Shader "Custom/Transparency " | |
{ | |
Properties | |
{ | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_Color ("Color", Color) = (1,1,1) | |
} | |
SubShader | |
{ | |
CGPROGRAM |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Introducción a los Algoritmos Geneticos | |
Autor: Guillermo Izquierdo | |
Este código es para fines educativos exclusivamente. | |
""" | |
geneSet = 'abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ ' | |
target = 'Hola Mundo' |
Accessing a subnet that is behind a WireGuard client using a site-to-site setup
We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.
NewerOlder