Skip to content

Instantly share code, notes, and snippets.

View jgadjetx's full-sized avatar
:octocat:
Gasping for air.

Phumudzo Muvhango jgadjetx

:octocat:
Gasping for air.
  • South Africa
  • 00:51 (UTC +02:00)
  • X @heyphumu
View GitHub Profile
@pedromassango
pedromassango / slipt_screen_in_two_parts.dart
Created December 27, 2018 23:11
This code split a flutter app into two parts.
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
Positioned(
top: 0,
bottom: MediaQuery.of(context).size.height / 2,
width: double.maxFinite,
@branflake2267
branflake2267 / main.dart
Last active December 11, 2022 16:33
Flutter - Getting data with firebase. I show two ways to get dat in the initState, 1. get data once and 2. and get updates in a stream.
import 'dart:async';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
runApp(new MyApp());
}
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@codediodeio
codediodeio / database.rules.json
Last active June 22, 2024 07:03
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@WillSams
WillSams / ipvanish_on_raspberry_pi.sh
Last active November 10, 2020 10:42
Set up IPVanish on Raspberry PI 3
# This script is designed to execute via the shell. Download this script on
# your Pi, edit the user and passwd above, execute the following commands:
# chmod +x ipvanish_on_raspberry_pi.sh
# sudo ./ipvanish_on_raspberry_pi.sh
# Of course, you can use this script just as a reference and type everything out.
# Place your ip vanish username here. For example, IPVANISHUSER=picrazy
IPVANISHUSER=
IPVANISHPASSWD=
@joepie91
joepie91 / vpn.md
Last active July 15, 2024 17:09
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active July 16, 2024 17:25
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@sararob
sararob / data-structure.js
Last active April 26, 2022 22:21
Role-based security in Firebase
/*
This example shows how you can use your data structure as a basis for
your Firebase security rules to implement role-based security. We store
each user by their Twitter uid, and use the following simplistic approach
for user roles:
0 - GUEST
10 - USER
20 - MODERATOR