Skip to content

Instantly share code, notes, and snippets.

View davidmartos96's full-sized avatar
💭
🧙‍♂️

David Martos davidmartos96

💭
🧙‍♂️
View GitHub Profile
@Tras2
Tras2 / cloudflare-ddns-update.sh
Last active November 14, 2024 03:50
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@agirault
agirault / CMakeLists.txt
Last active May 29, 2020 13:18
CMake configuration for a shared ios framework linking against static Qt5 libs to be embedded in an iOS app
# cmake /path/to/src \
# -GXcode \ # or Ninja
# -DQt5_DIR=/path/to/Qt/5.13.0/ios/lib/cmake/Qt5 \
# -DCMAKE_SYSTEM_NAME=iOS \
# -DCMAKE_OSX_DEPLOYMENT_TARGET=11 \
# -DCMAKE_INSTALL_PREFIX=/usr/local/frameworks \
# -DCMAKE_OSX_ARCHITECTURES="arm64" \ # arm64 for device, x86_64 for simulator (but x86_64 not in installed Qt5 ios static libs?)
cmake_minimum_required (VERSION 3.14 FATAL_ERROR)
project (Foo VERSION 1.0 LANGUAGES C CXX)
@rodydavis
rodydavis / flutter_github_ci.yml
Last active October 22, 2024 09:09
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@simolus3
simolus3 / cipher_db.dart
Last active January 15, 2021 09:08
Template to use moor_ffi with SQLCipher
import 'dart:async';
import 'dart:ffi';
import 'dart:io';
import 'dart:math';
import 'package:moor/backends.dart';
import 'package:moor/moor.dart';
import 'package:moor_ffi/moor_ffi.dart';
import 'package:moor_ffi/open_helper.dart';
@marcoredz
marcoredz / sliver_flexible_header.dart
Created October 21, 2022 20:53
Sliver header that can be floating or pinned based on a parameter
import 'dart:math' as math;
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
class SliverFlexibleHeader extends SingleChildRenderObjectWidget {
const SliverFlexibleHeader({
Key key,
@required Widget child,
this.floating = false, // pinned as default
@craiglabenz
craiglabenz / chat_message_render_box.dart
Last active October 19, 2024 17:28
Demonstrates a custom RenderObject that draws chat messages like WhatsApp, where the `sentAt` timestamp is tucked into the last line if it fits
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@valex91
valex91 / autoEA.sh
Created May 7, 2023 09:39
Update emudeck yuzu image to latest EA
#!/bin/bash
tagName=$(curl --silent "https://api.github.com/repos/pineappleEA/pineapple-src/releases/latest" |
grep '"tag_name":' |
sed -E 's/.*"([^"]+)".*/\1/')
curl -JLO "https://github.com/pineappleEA/pineapple-src/releases/download/${tagName}/Linux-Yuzu-${tagName}.AppImage"
mv -f "Linux-Yuzu-${tagName}.AppImage" $HOME/Applications/yuzu.AppImage