Skip to content

Instantly share code, notes, and snippets.

View SonPatrick's full-sized avatar
⚔️
𝙸 𝙰𝙼 𝚃𝙷𝙴 𝙴𝙳𝙶𝙴

Patrick Son SonPatrick

⚔️
𝙸 𝙰𝙼 𝚃𝙷𝙴 𝙴𝙳𝙶𝙴
View GitHub Profile
@hanskokx
hanskokx / provider.dart
Last active November 23, 2023 17:45
Flutter Provider example
import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(
ChangeNotifierProvider(
create: (context) => ShoppingCartProvider(),
child: const MyApp(),
@ullaskunder3
ullaskunder3 / README.md
Last active December 25, 2024 13:37
Detail flutter installation without android studio just using cmdline-tools, git, cmd
@syntaxhacker
syntaxhacker / Flutterinstallwithoutandroidstudio.md
Last active April 25, 2025 21:17
setup flutter without android studio

Flutter install without android studio

set flutter

Download flutter

tar xvf flutter_linux_1.17.5-stable.tar.xz

HIRE Me For Your Project Support :)
Telegram: https://t.me/LinuxGun
#!/bin/bash
# Completely Remove Apache Ubuntu
service apache2 stop
apt purge apache2
apt remove apache2.*
apt autoremove
whereis apache2
@ggichure
ggichure / main.dart
Created October 17, 2019 18:54
flutter theme changer and persist with shared prefrences
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
//https://stackoverflow.com/a/53107519/10409567
void main() async {
// load the shared preferences from disk before the app is started
WidgetsFlutterBinding.ensureInitialized();
final prefs = await SharedPreferences.getInstance();
// create new theme controller, which will get the currently selected from shared preferences
@kunalchandan
kunalchandan / markovChainsNames.java
Created March 14, 2018 05:07
Markov chains name generator complete class file.
import java.io.*;
import java.util.*;
public class markovChainsNames {
static ArrayList<String> names = new ArrayList<String>();
static ArrayList<Integer> ncounts = new ArrayList<Integer>();
static ArrayList<Integer> nlens = new ArrayList<Integer>();
static int alphaLen = 27;
class Logger {
sucesso(message) {
console.log(`SUCESSO: ${message}`)
}
error(message) {
console.error(`ERROR: ${message}`)
}
}
@SimoneStefani
SimoneStefani / AESenc.java
Last active January 6, 2025 13:36
Example of AES encryption and decryption in Java
/**
* Code written by P. Gajland
* https://github.com/GaPhil
*
* IMPORTANT:
* This code is for educational and demonstrative purpose only.
* If you need to do serious encryption for "production" it is
* recommended to investigate more traditional libraries and
* gain some specific knowledge on cryptography and security.
*/
@noelboss
noelboss / git-deployment.md
Last active April 1, 2025 16:56
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@AndersonFirmino
AndersonFirmino / velocity-plus.sh
Last active May 7, 2024 13:26
Programas que ajudam a melhorar desempenho Linux/Pc modestos
#!/bin/sh
# script para instalar programas que ajudam no desempenho.
echo "Esta de acordo em fazer o upgrade? (digite: ok e tecle enter se sim) "
read certeza
if [ "$certeza" = "ok" ]
then
sudo apt-get install zram-config -y
sudo apt-get install preload -y
sudo apt-get install prelink -y