Skip to content

Instantly share code, notes, and snippets.

View dahabit's full-sized avatar

Ahmed Abu Eldahab dahabit

View GitHub Profile
@dahabit
dahabit / ios_clean.sh
Last active February 26, 2022 23:03
Shell file that clean any Pods or Flutter dependencies before build
#!/bin/sh
echo "========== Cleanup start =========="
rm -Rf ios/Pods
rm -Rf ios/.symlink
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
rm -rf ios/Podfile.lock
rm -rf ~/Library/Developer/Xcode/DerivedData/* -y
rm -rf pubspec.lock
flutter clean
@dahabit
dahabit / SemanticsProperties.csv
Created November 22, 2021 06:11 — forked from salihgueler/SemanticsProperties.csv
SemanticsProperties
property explanation
enabled It represents the subtree or the widget that is used can be either enabled or disabled state.
checked It represents checked state of a widget similar to checkbox.
toggled It represents on/off state of a widget similar to switch.
selected It indicates that this subtree represents a widget that can be in selected/unselected state.
button It represents a button is in this subtree.
header It represents a header is in this subtree
textfield It represents a text field is in the subtree
focused It represents that current node holds the input focus. It's not the same with Accessibility Focus
inMutuallyExclusiveGroup It represents if the node is in a mutually exclusive group. E.g. Radiobutton in radio group.
@dahabit
dahabit / node_nginx_ssl.md
Created March 29, 2020 09:29 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

abstract class State<T extends StatefulWidget> extends Diagnosticable {
}
class _MyHomePageState extends State<MyHomePage>
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
}
void main() {
var circleSlot = new Slot<Circle>();
circleSlot.insert(new Circle());
var squareSlot = new Slot<Square>();
squareSlot.insert(new Square());
}
class Circle {}
void main() {
var circleSlot = new CircleSlot();
circleSlot.insert(new Circle());
var squareSlot = new SquareSlot();
squareSlot.insert(new Square());
}
class Circle {}
import 'model.dart';
typedef OnChatMessageCallback = void Function(int index, ChatMessage message);
abstract class ChatManager {
ChatManager();
ChatSession getNamedSession(String name);
}
@dahabit
dahabit / slack-file-killer.js
Created October 4, 2017 13:01 — forked from iamstuartwilson/slack-file-killer.js
Kill multiple slack files from your browser console. Simply paste this code when on the "https://[space].slack.com/files/[me]" page.
(function(){
$('#files_list > [data-file-id]').each(function(i) {
killIt($(this).attr('data-file-id'));
function killIt(id) {
console.log(id);
$.post('/api/files.delete', {
file: id,
token: boot_data.api_token