Skip to content

Instantly share code, notes, and snippets.

@dumazy
dumazy / dart-fix-all-separately.sh
Created June 5, 2024 09:56
Apply all 'dart fix' separately
#!/bin/bash
# This script applies Dart fixes to a project and commits the changes for each fix separately.
# It uses the `dart fix --dry-run` command to find the fixes that can be applied.
# For each fix, it applies the fix and commits the changes with a message indicating the fix code.
checkDart() {
if ! command -v dart &> /dev/null
then
echo "Dart could not be found. Please install Dart first."
# Importing libraries
import hashlib
import os
import threading
import time
from urllib.request import urlopen, Request
# baseado neste post - https://codingshiksha.com/python/python-3-script-to-monitor-website-url-changes-website-monitoring-full-python-script-for-beginners/
import telebot
@Vanethos
Vanethos / build.sh
Last active May 31, 2023 09:21
Script to run Flutter Apps
#!/bin/bash
BLUE='\x1b[34m\x1b[1m'
NC='\x1b[0m' # No Color
echo ""
printf "${BLUE}[ 🏗️ ] Build models${NC} \n"
cd modules/models
flutter packages pub run build_runner build --delete-conflicting-outputs
cd ../..
@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@legalcodes
legalcodes / mock_result.dart
Created April 23, 2019 20:17
Mock _result function
void _result(bool success, [List<String> messages]) {
final joinedMessages = messages?.map((m) => m.toString())?.join(',') ?? '';
print('success: $success, "messages": $joinedMessages');
}
@yinzara
yinzara / github_bitbucket_multiple_ssh_keys.md
Last active November 2, 2024 23:40
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@munificent
munificent / generate.c
Last active September 15, 2024 03:16
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
<?
// this script receives a Stripe dispute / chargeback and:
//
// - immediately refunds the payment
// - closes the user's account (in my DB, add your own code there)
//
// this is to automate dispute handling (because you never win a dispute on Stripe anyway)
// and by refunding avoiding the chargeback fee
//
@nisrulz
nisrulz / androidDevAliases.sh
Created April 15, 2018 12:18
All of my android development aliases.
# I use ZSH, here is what I added to my .zshrc file (config file)
# at ~/.zshrc
# ------------------ Android ------------------ #
# Have the adb accessible, by including it in the PATH
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:path/to/android_sdk/platform-tools/"
# Setup your Android SDK path in ANDROID_HOME variable
export ANDROID_HOME=~/sdks/android_sdk
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch