Skip to content

Instantly share code, notes, and snippets.

View Azzeccagarbugli's full-sized avatar
🌧️
Enjoying the dutch rain

Francesco Coppola Azzeccagarbugli

🌧️
Enjoying the dutch rain
View GitHub Profile

App review - spawn a review only when user meets a threashold

Still Testing

import 'dart:math';

import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:in_app_review/in_app_review.dart';
import 'package:zylag/core/data/local_data_source.dart';
import 'package:zylag/core/data/typedefs.dart';
@venbrinoDev
venbrinoDev / LocationUtilities.md
Created April 9, 2024 13:53
Location Utilities

Location Service

you can just create an intsance/(you can register this with get_it/ioc contiainer) for easy usage

import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_polyline_points/flutter_polyline_points.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:your_project_folder/permission_manager.dart';
@xjcl
xjcl / shitty_pong.py
Last active June 8, 2021 12:50
A simple pong game written in python and pyglet.
"""
Play a simple game of pong in a window.
Player 0 controls: (W, S) Player 1 controls: (O, L). Quit: (Q)
The ball bounces differently if you move while hitting it.
This also includes a slight factor of randomness.
Requires: pyglet, 10x10 image in directory: "white_square.png"
"""
@turbinenreiter
turbinenreiter / serialplot2
Created March 5, 2014 19:20
plotting data from serial port with matplotlib
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import serial
fig, ax = plt.subplots()
line, = ax.plot(np.random.rand(10))
ax.set_ylim(-5000, 5000)
xdata, ydata = [0]*100, [0]*100
raw = serial.Serial("/dev/ttyUSB1",9600)
@turbinenreiter
turbinenreiter / serialplot
Created December 10, 2013 20:43
Code to read data from the serial port and plot it.
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
from pyqtgraph.ptime import time
import serial
app = QtGui.QApplication([])
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@paulmoore
paulmoore / Animal.lua
Created December 4, 2011 07:06
A simple Class implementation in Lua for Object-Oriented Programming.
--- Animal.lua
--
-- A simple example of a base class usng the classes library.
--
-- @author PaulMoore
--
-- Copyright (C) 2011 by Strange Ideas Software
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal