Skip to content

Instantly share code, notes, and snippets.

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

Arttu Ylhävuori areee

👨‍💻
Coding
View GitHub Profile
@mhawksey
mhawksey / gist:5599539
Last active March 1, 2018 15:28
Experiment to create a document map for Google Docs using Google Apps Script
function onOpen() {
// Add a menu with some items, some separators, and a sub-menu.
DocumentApp.getUi().createMenu('Custom')
.addItem('Show Document Map', 'showDocumentMap')
.addToUi();
}
function showDocumentMap() {
// based on http://stackoverflow.com/a/12244248/1027723
@nesquena
nesquena / .gitignore
Last active April 4, 2019 11:22
Android .gitignore File
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@tiberiomarco01
tiberiomarco01 / Merry Christmas, Codepen!.markdown
Created January 12, 2016 17:36
Merry Christmas, Codepen!
@jongillies
jongillies / Platform.cs
Created September 22, 2012 22:57
How to determine your platform in C#
using System;
namespace Supercoder.Tools
{
public class Platform
{
public static string PlatformString()
{
const string msg1 = "This is a Windows operating system.";
const string msg2 = "This is a Unix operating system.";
@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)
{
@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
@iiska
iiska / Nettiradiot.m3u
Created June 6, 2009 11:02
Lähes kaikki Suomalaisten radioasemien nettiradiot.
#EXTM3U
#EXTINF:0,Bassoradio
http://83.145.201.209:8000/
#EXTINF:0,Classic Radio
http://217.30.180.242:8000/clsr.ogg
#EXTINF:0,Groove FM
http://217.30.180.242:8000/gvfm.ogg
@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) {
@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)