Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sansal54's full-sized avatar

sansal54

  • SanKontrol
  • Istanbul, TURKEY
View GitHub Profile
@sansal54
sansal54 / gradient.dart
Created March 6, 2024 11:39 — forked from tusharhow/gradient.dart
Did you know that in Flutter, bringing gradient colors to your text is a breeze? 🚀💻 Just sprinkle a bit of code magic:
Text(
"Gradient Text Example",
style: TextStyle(
fontSize: 50.0,
fontWeight: FontWeight.bold,
foreground: Paint()
..shader = const LinearGradient(
colors: <Color>[
Colors.red,
Colors.blue,
@sansal54
sansal54 / install_pyenv.sh
Last active April 12, 2022 09:38 — forked from jmvrbanac/install_pyenv.sh
Install pyenv on Ubuntu
sudo apt-get install git python3-pip make build-essential libssl-dev libffi-dev python-is-python3 zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl
sudo pip3 install virtualenvwrapper
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
@sansal54
sansal54 / create_new_user.md
Created August 10, 2021 21:36 — forked from JeremyIglehart/create_new_user.md
How to create a new user and remove the `pi` user on a Raspberry Pi

How to create a new user and remove the pi user on a Raspberry Pi

Note: This has been tested in Rasbian Buster released on 2019-06-20

Important: replace jeremy below with whatever username you'd like as your new user.

  1. sudo adduser jeremy
    • You will be asked to enter a password
    • When filling out basic information about the user, you may leave it blank
@sansal54
sansal54 / quote.dart
Created December 9, 2019 20:27 — forked from mjohnsullivan/quote.dart
Simple Flutter app to retrieve and display a quote of the day
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@sansal54
sansal54 / Rpi-InfluxDB-Install.md
Created October 8, 2019 17:19 — forked from boseji/Rpi-InfluxDB-Install.md
Raspberry Pi InfluxDB installation

Raspberry Pi InfluxDB: The solution for IoT Data storage

Raspberry Pi is costeffect linux computer very commonly used for IoT home automation projects.

Here are the 3 problems with conventional databases for IoT data store applications:

  • Too much or complex configuration
  • Unable to expire data / set retentional policies
  • Not tailor made of Time Series Data
import PID
import time
import os.path
from OmegaExpansion import AdcExp
from OmegaExpansion import pwmExp
pwmExp.setVerbosity(-1)
pwmExp.driverInit()
adc = AdcExp.AdcExp()