Skip to content

Instantly share code, notes, and snippets.

View areee's full-sized avatar
👨‍💻
Coding

Arttu Ylhävuori areee

👨‍💻
Coding
View GitHub Profile
@wingkit-leung
wingkit-leung / main.dart
Last active January 9, 2023 10:05
Flutter cross platform data persistence solution: shared_preferences with riverpod
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:shared_preferences/shared_preferences.dart';
// A Counter example implemented with riverpod and shared_preferences
/// Providers are declared globally and specify how to create a state
final counterProvider = StateProvider((ref) => 0);
final sharedPrefs = Provider<SharedPreferences>((ref) {
@areee
areee / README.md
Last active April 24, 2021 17:29
Raffle a random order for meeting participants

How to install Lua & develop and run the lottery.lua file (in macOS)

Install Lua by using Homebrew

  • Open Terminal and copy & paste this:
brew install lua
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active November 12, 2024 13:33
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@jj09
jj09 / Xml2Json
Last active April 20, 2021 12:22
Convert XML to JSON in C#
using Newtonsoft.Json;
using System.IO;
using System.Xml;
namespace ConvertXml2Json
{
class Program
{
static void Main(string[] args)
{
@johnkors
johnkors / git-prune-merged.ps1
Last active March 22, 2023 22:23
PowerShell script to delete branches merged to master
# update local list of pruned branches on the remote to local:
git fetch --prune
# delete branches on remote origin that have been merge to master
git branch --merged remotes/origin/master -r | %{$_.trim().replace('origin/', '')} | ?{$_ -notmatch 'master'} | %{git push --delete origin $_}
# delete local branches that have been merged to master
git branch --merged remotes/origin/master | %{$_.trim()} | ?{$_ -notmatch 'master'} | %{git branch -d $_}
# remove stale refs (local refs to branches that are gone on the remote)
@nikhita
nikhita / update-golang.md
Last active November 15, 2024 08:50
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@tiberiomarco01
tiberiomarco01 / Merry Christmas, Codepen!.markdown
Created January 12, 2016 17:36
Merry Christmas, Codepen!
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active August 28, 2024 03:20
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active November 16, 2024 13:50
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)