Skip to content

Instantly share code, notes, and snippets.

View RockinPaul's full-sized avatar
🐢

Paul Zarudnev RockinPaul

🐢
  • Amsterdam, Netherlands
View GitHub Profile
@RockinPaul
RockinPaul / claude_3.5_sonnet_artifacts.xml
Created July 22, 2024 22:40 — forked from SMUsamaShah/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt (Updated) + markdown code blocks inside artifact tag (to use in other chat clients)
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
<!-- Add this file to: ~/Library/Developer/Xcode/UserData/FontAndColorThemes -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.901961 0.831373 0.639216 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
@RockinPaul
RockinPaul / extract.dart
Created August 26, 2022 08:12 — forked from magnatronus/extract.dart
Extracting BBC Micro:bit accelerometer data using Flutter Blue
/// This gist assumes that Flutter Blue (https://github.com/pauldemarco/flutter_blue) is used to connect to a BBC Micro:bit
/// and is listening to the [device.onValueChanged] for the correct characteristic ("E95DCA4B-251D-470A-A062FA1922DFA9A8")
///
/// this will be something similar to
///
/// device.onValueChanged( (accChar).listen( (value){ convertRawData(value)}));
///
/// the 'raw' listen value is a List<int> of length 6 this needs to be converted into the X,Y and Z values from the
/// accelerometer and is done with the function below
///
@RockinPaul
RockinPaul / main.dart
Created June 21, 2022 10:45 — forked from ilikerobots/main.dart
Basic examples: Dart call() and Function.apply()
class Adder implements Function {
call(int a, int b) => a + b;
}
class Incrementer implements Function {
int _amt;
Incrementer(this._amt);
call(int a) => a + _amt;
}
@RockinPaul
RockinPaul / custom_tab_bar.dart
Created May 17, 2022 07:30 — forked from theachoem/status_tab_bar.dart
TabBar with badge that update color on swap - Demo included (Flutter)
// Copyright 2021, Thea Choem, All rights reserved.
import 'package:badges/badges.dart';
import 'package:flutter/material.dart';
class CustomTabBarItem {
final String label;
final String? value;
CustomTabBarItem({
@RockinPaul
RockinPaul / linebreak.md
Created January 11, 2022 15:17
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


@RockinPaul
RockinPaul / revert-a-commit.md
Created January 2, 2022 14:02 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@RockinPaul
RockinPaul / config.yml
Created December 6, 2021 01:18 — forked from tasaquino/config.yml
CircleCI configuration for Flutter with flavors and schemes - Configuration to send beta and generate artifacts (prod flavor)
version: 2.1
jobs:
ios_distribute_beta:
macos:
xcode: "10.3.0"
working_directory: ~/flutter-app
steps:
- add_ssh_keys:
fingerprints:
- "ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab"
import 'package:flutter/material.dart';
class Bubble extends StatelessWidget {
Bubble({this.message, this.time, this.delivered, this.isMe});
final String message, time;
final delivered, isMe;
@override
Widget build(BuildContext context) {
@RockinPaul
RockinPaul / main.dart
Created October 20, 2020 09:08 — forked from AgainPsychoX/main.dart
Dart: Convert a `String` to a `Uint8List` and `Uint8List` to `String` (UTF-16)
import 'dart:typed_data';
void main() {
// Source
String source = 'Hello! Cześć! 你好! ご挨拶!Привет! ℌ𝔢𝔩𝔩𝔬! 🅗🅔🅛🅛🅞!';
print(source.length.toString() + ': "' + source + '" (' + source.runes.length.toString() + ')');
// String (Dart uses UTF-16) to bytes
var list = new List<int>();