Skip to content

Instantly share code, notes, and snippets.

@Simpler1
Simpler1 / lists.dart
Created October 18, 2022 18:49
Dart Lists
void main() {
final List list1 = ['zero', 'one', 'two', 'three'];
final List list2 = list1; // <- Create a new reference to the same list
list2[1] = 'five';
print('$list1 $list2');
final List list3 = ['nine', 'ten', 'eleven'];
final List list4 = List.from(list3); // <- Create a brand new list
list4[1] = 'twenty';
print('$list3 $list4');
@Simpler1
Simpler1 / noip2.service
Last active September 11, 2023 15:48 — forked from NathanGiesbrecht/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# No-ip.com Dynamic DNS Updater
#
cd ~/Downloads
wget https://dmej8g5cpdyqd.cloudfront.net/downloads/noip-duc_3.0.0-beta.7.tar.gz
tar xf noip-duc_3.0.0-beta.7.tar.gz
apt install binaries/noip-duc_3.0.0-beta.7_amd64.deb
vi /etc/default/noip-duc
NOIP_USERNAME=
NOIP_PASSWORD=
@Simpler1
Simpler1 / main.dart
Created March 6, 2019 21:20
orderByOtherList
main() {
List myList = [
{'id': 'red', 'test': 'some data'},
{'id': 'green', 'other': 'some other data'},
{'id': 'blue'},
];
List myOrderList = [
{'id': 'red', 'order': 1},