Skip to content

Instantly share code, notes, and snippets.

@ersingencturk
ersingencturk / setup python.md
Last active May 26, 2024 15:09
Installing Python 3.11 & Rust on Raspberry Pi

Installing Python 3.11 & Rust on Raspberry Pi

Python 3.11 is not available as apt package on debian raspbian bullseye so installing from source needed

updatepython2v11.sh can be used to compile python 3.11 on raspberry pi

installing packages like bcrypt and cryptography needs rust compiling so rust compiler needed if you don't do that you will get error liek this:

Building wheels for collected packages: bcrypt
from time import sleep
import ssl
import json
import os
from paho.mqtt.client import Client
username = "your VRM email"
password = "your VRM pasword"
portal_id = "your VRM portal ID"
@ersingencturk
ersingencturk / ventura.txt
Created November 4, 2022 22:25
macos ventura upgrade/update problems
updating to macos ventura comes with some problems here are a few and fixes:
1- after update no more external monitors. simpy they didn't work. it turns out you have to go to settings> privacy & security > allow accessories to connect = always and turn on and off your monitors and plug in usb-c cables again
2- if you use ssh/git or anycombination of these you won't be able to use them errors like:
solution is add a new file: ~/.ssh/config with contents
Host *
HostkeyAlgorithms +ssh-rsa
@ersingencturk
ersingencturk / setup-ais.md
Last active April 15, 2022 01:29 — forked from psiphi75/setup-ais.sh
Make an AIS listening station using RTL-SDR (RTL2832U) on m1 mac
#!/bin/bash
# Get CubicSDR
sudo apt install librtlsdr0 cubicsdr
# Need to calibrate the ppm (part per million) value. Getting an accurate calibration is critical. Find a frequency that works. For me 785.5 MHz seems to do well, there is a dip in noise just at that frequency, with an occasional spike.
# I use the follow website to find exact frequencies of cell signals.
# https://gis.geek.nz/celltowers
@ersingencturk
ersingencturk / haproxy.cfg
Created March 30, 2022 21:52 — forked from cmer/haproxy.cfg
Simple, no bullshit TCP port forwarding using HAProxy
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, user-scalable=no">
<head><title>SOUND</title></head>
<body>
<style>
button{
height:100px;
width:100px;
}
@ersingencturk
ersingencturk / tweet_dumper.py
Created July 26, 2017 08:00 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@ersingencturk
ersingencturk / CameraImage.cpp
Created January 12, 2016 21:26 — forked from kylemcdonald/CameraImage.cpp
openFrameworks app for sending images to disk for processing, and reading text back from disk. Used for "NeuralTalk and Walk".
#include "ofMain.h"
#include "ofxTiming.h"
class ofApp : public ofBaseApp {
public:
ofVideoGrabber grabber;
DelayTimer delay;
ofTrueTypeFont font;
string description;
@ersingencturk
ersingencturk / gist:433ff75051c817a0ef5a
Created May 1, 2015 23:42
measure touch to click delay
var button = document.querySelector( "button" ),
span = document.querySelector( "span" ),
delay;
button.addEventListener( "touchend", function() {
delay = Date.now();
});
button.addEventListener( "click", function() {
@ersingencturk
ersingencturk / new_gist_file.sql
Created January 3, 2015 02:09
moving sql server temp file to another disk
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE
(NAME = tempdev, FILENAME = 'D:\sql\Tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE
(NAME = templog, FILENAME = 'D:\sql\Tempdb.ldf');
GO