Skip to content

Instantly share code, notes, and snippets.

View Davenchy's full-sized avatar

Davenchy Davenchy

View GitHub Profile
@psygo
psygo / reflection_and_annotations.md
Last active March 31, 2024 16:48
Reflection and Annotations in Dart

Reflection in Dart

Unfortunately, [since mirrors currently bloat compiled code][no_support_mirrors], it isn't supported for Flutter or web apps. A [workaround][source_gen_tutorial] would be to use a package like [source_gen][source_gen].

dart:mirrors

Most of the info here, comes from [Understanding Reflection and Annotations in Dart tutorial][reflection_tutorial], from the Fullstack Dart and Flutter Tutorials YouTube channel. He also created a [gist][gist_tutorial] with it.

@vinicioslc
vinicioslc / flutter-android-cd.yml
Last active May 10, 2024 22:01
Build flutter releases in github actions for production only android for while.
# This is a basic workflow to help you get started with Actions
name: CD Internal-Lane
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- "internal-v*.*.*" # on every version tag will build a new android artifact example: v3.1.2+6
jobs:
@syntaxhacker
syntaxhacker / Flutterinstallwithoutandroidstudio.md
Last active May 21, 2024 11:22
setup flutter without android studio

Flutter install without android studio

set flutter

Download flutter

tar xvf flutter_linux_1.17.5-stable.tar.xz

@c4software
c4software / download-multiple-files.js
Created June 6, 2018 08:56 — forked from noelvo/download-multiple-files.js
Download multiple files then compress to one zip file using JSZip & JSZip-utils
var zip = new JSZip();
var count = 0;
var zipFilename = "zipFilename.zip";
var urls = [
'http://image-url-1',
'http://image-url-2',
'http://image-url-3'
];
urls.forEach(function(url){
@fakhrullah
fakhrullah / list-of-hacking-games.md
Last active April 30, 2024 05:11
List of hacking game, wargame or capture the flag (CTF) for some one who want to learn hacking.
// We allocate a file with the size of the downloaded file so we can
// append chunks randomly to diffrent position as we download the file
function allocateDisk(size, callback){
fss.cwd.getFile(prompt("Filename","movie.mp4"), {create: true}, (fileEntry) => {
fileEntry.createWriter((writer) => {
var blob = new Blob([new ArrayBuffer(1.049e+8)])
writer.onerror = (err) => {
@dreadpiratesr
dreadpiratesr / [PYTHON]
Last active April 8, 2022 03:23
Facebook Reset Code 0day Python Version
#Facebook Reset Code 0day Python Version
#If you want to edit this script you are free i don't give a fuck cause it tooks 2 minutes to write xD \!/
#As a temporarily solution, use requesocks Module
#How to install?
#with pip : pip install requesocks
#with easy_install : easy_install requesocks
import urllib2 ,sys ,re
import os
import ssl
@racerxdl
racerxdl / measure.py
Created September 18, 2014 06:07
Linux Network Traffic Measure/Calculator Python Script
#!/usr/bin/env python
'''
_______ ______
|_ _\ \ / / ___|
| | \ \ / /\___ \
| | \ V / ___) |
|_| \_/ |____/
Teske Virtual System
@AnnaGerber
AnnaGerber / 11_piezo.py
Last active October 16, 2022 13:51
PyFirmata code for Freetronics Experimenter's Kit
import pyfirmata
import math
board = pyfirmata.Arduino("/dev/ttyACM0")
# connect piezo to pin 9 to use PWM
SENSOR_PIN = 0
PIEZO_PIN = board.get_pin('d:9:p')
it = pyfirmata.util.Iterator(board)
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active May 20, 2024 11:27
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');