Skip to content

Instantly share code, notes, and snippets.

View sui77's full-sized avatar

Suat Özgür sui77

  • MindGeek
  • Hamburg, Germany
View GitHub Profile
Vector2 GetMouseDirection(float distance) {
Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
float xp = body.position.x;
float yp = body.position.y;
float xm = mousePosition.x;
float ym = mousePosition.y;
float a; float b; float angle;
if (xm >= xp && ym >= yp) {
<?php
$date = $_GET['date'];
if (!preg_match('/^[0-9]{4}_[0-9]{2}_[0-9]{2}$/', $date)) {
exit('invalid date');
}
if (!copy('https://www.divi.de/joomlatools-files/docman-files/divi-intensivregister-tagesreports/DIVI-Intensivregister_Tagesreport_' . $date . '.pdf', '/tmp/divi' . $date . '.pdf')) {
exit('could not get pdf file');
}
void setup() {
pinMode(0, OUTPUT);
digitalWrite(0, HIGH);
delay(50);
digitalWrite(0, LOW);
delay(10);
digitalWrite(0, HIGH);
}
void loop() {
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHTfr+s96Whq3Xa20WHwfJ/VIjv5/7ZOtKAk/hlqnJdd45gjQ7ldICVXitcvajiYcfelaYX9dczsURB4AYUrDesIwOqTwqHC/EE76xzg/8M4kZxf95QpnyjtkF0RNU75d7iDXDhMhbSHS84unt3SPGHqJbvhlIGoX6kOi6OhvO4qCM5DPzGRSKZYuTTEqt5WWqceAV/zmF4byIKNj0cwuKKj3xRSyCRopI2P0hZRFHQFHY7k5G2mdmucikZljqf3IcNmj9xBIDIPCAO/s1mI48nLT1BmJpnNy9zdJVREczCpKSVGe0/qmiabwyEiAFklF1t7ItgJtZwW3F0GZZETCYkRW89+tCTQHSXDtRd7/g6s4IuESCXXz+7zLqiJGMTdSWPlBu4N3Xb0oCqiW1qqX3MNKIvyUuOPVs1QlvDfX6K5j/Ps0iTjkS17jcWXXDLa0TNwz6ZffL9N5sUs0pG57UnvNAvXfBtl8QwZz4/c+AEj/aqv8QjUZuTenV0sqC3ykQMWZdqqoDsqd7wf3vkObT0fiZt4HswY7dRdXLuVHfCbCzvNoA5pA3OK9hKVfNY3xBKbfnzApb2YACSFlkcRhUIrokgeKGTCOgkXWyIA/7am4PxU9HW9eGSIwG/xTKnqwMbFD01fJHLIWkvQiWj0UphLiFRSjKYyQ+BBBleck73w== s.oezguer@Suats-MBP
@sui77
sui77 / README.txt
Created February 21, 2021 21:02
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@sui77
sui77 / README.txt
Created February 21, 2021 21:01
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
#define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BME280 bme1;
#include <Adafruit_NeoPixel.h>
#define PIN D6
#define NUMPIXELS 16
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
/**
* Werte von 0..360 auf 0..65k mappen
*/
uint16_t degree2uint16(int degree) {
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/9.0.0/bignumber.min.js"></script>
<script>
function packTorch(entryId, operationId, lat, long) {
let sEntryId = parseInt(entryId).toString(16);
let sOperationId = new BigNumber(operationId).toString(16);
// map coords to positive int range
let sLat = Math.round((90 + lat) * 1e+7).toString(16);
<?php
require '../vendor/autoload.php';
use \ZuluCrypto\StellarSdk\Keypair;
use \ZuluCrypto\StellarSdk\Server;
use \ZuluCrypto\StellarSdk\XdrModel\Memo;
$server = Server::testNet();
$sourceKeypair = Keypair::newFromSeed('SDAP46Z3PXPZLZELRBLRCMS72C23LHHDCGJ2U3D6K5DXUN6A4KARNUNT');