Skip to content

Instantly share code, notes, and snippets.

View insinfo's full-sized avatar

Isaque Neves insinfo

  • Prefeitura de Rio das Ostras
  • Rio de Janeiro - Brasil
View GitHub Profile
@insinfo
insinfo / rsa_pem.dart
Created June 13, 2023 04:19 — forked from proteye/rsa_pem.dart
How to encode/decode RSA private/public keys to PEM format in Dart with asn1lib and pointycastle
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';
import "package:pointycastle/export.dart";
import "package:asn1lib/asn1lib.dart";
List<int> decodePEM(String pem) {
var startsWith = [
"-----BEGIN PUBLIC KEY-----",
"-----BEGIN PRIVATE KEY-----",
@Egor-Skriptunoff
Egor-Skriptunoff / how_to_install_lua_and_luajit_on_windows.md
Last active July 11, 2024 15:24
How to install Lua and LuaJIT on Windows

How to install Lua and LuaJIT on 64-bit Windows

  1. Download the latest Lua and LuaJIT sources

    • Create temporary folder for Lua sources.
      I assume you would use C:\Temp\ folder.

    • Visit Lua FTP webpage and download the latest Lua source archive, currently it is lua-5.4.3.tar.gz

  • Use suitable software (7-Zip, WinRar, WinZip or TotalCommander) to unpack the archive.
@Abdullamhd
Abdullamhd / pi_chart.dart
Created May 2, 2020 11:07
this is pure pi chart in dart programming language
// chart data
List expenses = [
{"name":"Groceries","amount":500.0},
{"name":"Online Shopping","amount":100.0},
{"name":"Eating out","amount":80.0},
@sangdongvan
sangdongvan / main.dart
Last active February 27, 2024 13:20
Dock layout
import 'dart:math';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'dart:ui';
void main() {
runApp(MyHomePage());
}
class MyHomePage extends StatefulWidget {
@willeccles
willeccles / sockets.h
Last active May 9, 2024 06:43
Cross-platform socket header for both POSIX sockets and Winsock
/*
* File: sockets.h
* Author: Will Eccles
* Date: 2020-03-12
*
* 1. Description
*
* This header attempts to make it easy to use sockets across platforms,
* for both Windows and POSIX systems. While Winsock is often somewhat
* compatible with Berkeley sockets, it is not strictly compatible,
@m-antoni
m-antoni / php_apache_mysql_win10.md
Created November 22, 2019 16:38
How to Setup PHP 7.2, Apache and MySQL in Windows 10

How to Setup PHP 7.2, Apache and MySQL in Windows 10

  1. First is to download php 7 to this website https://windows.php.net/download/

    • download VC15 x86 or x64 Thread Safe
    • download x86 for 32bit and x64 for 64bit system
  2. Make a directory and save it to this path C:/php

  3. Go to https://www.apachelounge.com/download/ to download the Apache server

  • Download Apache 2.4.39 Win64 or Apache 2.4.39 Win32
@trueroad
trueroad / Makefile
Last active August 1, 2023 10:11
Extract PDF signature tool
QPDF_PREFIX = /usr/local
QPDF_PKGCONFIG_PATH = $(QPDF_PREFIX)/lib/pkgconfig
BIN = extract-pdf-sig
.PHONY: all clean
all: $(BIN)
OBJS = $(addsuffix .o,$(BIN))
@trueroad
trueroad / JohnDoe.pfx
Last active June 13, 2023 18:00
Experiment PDF sign tool
@cardil
cardil / JEP.md
Last active June 18, 2024 20:42
[Draft] JEP - Change name of imported type (aliasing)

Summary

Change name of imported type (aliasing)

Goals

The goal is to make code more productive and clean in cases where multiple classes with same name must be used in code. It should relief a developers frustration in that

@ajmaln
ajmaln / downloadFile.dart
Last active February 20, 2024 17:12
Download file with progress in Dart/Flutter using 'http' package
import 'dart:typed_data';
import 'dart:io';
import 'package:http/http.dart';
import 'package:path_provider/path_provider.dart';
downloadFile(String url, {String filename}) async {
var httpClient = http.Client();
var request = new http.Request('GET', Uri.parse(url));