Skip to content

Instantly share code, notes, and snippets.

@felipecastrosales
felipecastrosales / main.dart
Created April 28, 2021 02:31
Responsive Framework e Device Preview Juntos
import 'package:flutter/material.dart';
import 'package:device_preview/device_preview.dart';
import 'package:responsive_framework/responsive_framework.dart';
import 'package:responsive_framework/responsive_wrapper.dart';
import 'pages/home/home_page.dart';
void main() {
runApp(DevicePreview(enabled: true, builder: (_) => MyApp()));

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

@royz
royz / MongoDB.md
Last active April 24, 2024 20:20
MongoDB - install, enable authentication & remote access on Ubuntu 20.04

Install MongoDB 5.x

Source: MongoDB Docs

1. Import the public key used by the package management system

wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

2. Create a list file for MongoDB

@Eunit99
Eunit99 / main.py
Last active April 24, 2024 20:17
Complete code for the article: Scraping real estate data: Step-by-step guide for Apify Blog.
"""
This module defines the `main()` coroutine for the Apify Actor, executed from the `__main__.py` file.
Feel free to modify this file to suit your specific needs.
To build Apify Actors, utilize the Apify SDK toolkit, read more at the official documentation:
https://docs.apify.com/sdk/python
"""
from apify import Actor
@derlin
derlin / DockerCassandra-InitDb.md
Last active April 24, 2024 20:17
Dockerfile and entrypoint example in order to easily initialize a Cassandra container using *.sh/*.cql scripts in `/docker-entrypoint-initdb.d`

Initializing a Cassandra Docker container with keyspace and data

This gist shows you how to easily create a cassandra image with initial keyspace and values populated.

It is very generic: the entrypoint.sh is able to execute any cql file located in /docker-entrypoint-initdb.d/, a bit like what you do to initialize a MySQL container.

You can add any *.sh or *.cql scripts inside /docker-entrypoint-initdb.d, but note that:

  • *.sh files will be executed BEFORE launching cassandra
@ezracb
ezracb / VMware Workstation Pro and Fusion Pro Licence Keys
Created April 9, 2021 14:43
VMware Workstation Pro and Fusion Pro Licence Keys
Obviously using these keys may be a grey area. I use them for my computer, but there are no guarentees VMware won't sue you if you use them in a commercial environment.
VMware Workstation 16
YF390-0HF8P-M81RQ-2DXQE-M2UT6
VMware Fusion Pro 12
YF390-0HF8P-M81RQ-2DXQE-M2UT6
As far as I know, this key works on both Fusion and Workstation.
@tuxuser
tuxuser / xbl_oauth2.py
Created September 2, 2020 09:15
Sign in to Xbox Live with OAUTH2
"""
Sign in to Xbox Live with OAUTH2
1. Go to https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
2. Register new app ("+ New registration")
2.1. Enter a name for your app
2.2. Set "Supported account types" to "Personal Microsoft accounts only"
2.3. Click register
2.4. Choose "Redirect URIs" -> "Add a Redirect URI"
2.5. Click "Add a platform" -> "Mobile and desktop applications"
@jamesy0ung
jamesy0ung / Microsoft Static Activation Keys
Created September 26, 2020 22:37
Microsoft Static Activation Keys for many Microsoft products
Access 2003 Developer Extensions: KHCYK-2DXWD-6D4BV-9D9K6-TT9RY
Access 2003: HVCBT-WQ823-BHMJC-RQJ3P-9T9VT
Advanced Threat Analytics (ATA): F3JM7-7QNWQ-KKFVP-PDDRT-4M6P7
Automatic Graph Layout: HWQWP-RXKVP-PJ4BB-9KD87-K67H2
Commerce Server 2002: QJY77-8G8BD-3FYFQ-FDFH3-4RDCP
CRM 2011 Server Edition: 36D7J-FR6QG-JXPF6-H449P-2P6RR
CRM 2011 Workgroup Server Edition: 73B26-GWVRK-GDX7X-MDQBX-DH28R
CRM 3.0 Professional Edition: D2Q47-3K4QX-FPVDT-P4QT6-3C8H8
CRM 3.0 Small Business Edition: TD7BB-D2H87-27KJH-VMH3P-QTQYW
CRM 4.0 Enterprise Edition: WQWYD-FHH7F-XQPCK-2B8KG-D6VT3
@arkatsy
arkatsy / zustand-internals.jsx
Last active April 24, 2024 20:13
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {
[
"1185030898148724777",
"956131521733984287",
"956097947727179806",
"1185045871478448242",
"932096380879667253",
"956246550152118374",
"928549000431407164",
"976786710836944936",
"956128945227567145",