Skip to content

Instantly share code, notes, and snippets.

View ekoRemDev's full-sized avatar
🌍
Coding

Eko ekoRemDev

🌍
Coding
View GitHub Profile
import UIKit
import Firebase
import FirebaseMessaging
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
@rjmarquez
rjmarquez / weather.dart
Last active April 2, 2025 00:29
Observer Pattern implemented in Dart (HeadFirst Design Patterns - Weather Station example)
void main() {
WeatherData weatherData = new WeatherData();
CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData);
StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);
ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
weatherData.setMeasurements(80, 65, 30.4);
var request = require("request");
var cheerio = require("cheerio");
var url = "https://en.wikipedia.org/wiki/Main_Page";
exports.endpoint = function(req, res){
request(url, function(error, response, body){
if(!error){
var $ = cheerio.load(body);
var article = $('#mp-tfa > p').text().replace(" (Full article...)","");
@mikemimik
mikemimik / main.dart
Last active August 3, 2022 04:21
Flutter: Custom theme data
import 'package:flutter/material.dart';
import 'theme.dart' as Theme;
void main() {
runApp(
new MaterialApp(
title: 'CompanyApp',
color: Theme.CompanyColors.blue[500],
theme: Theme.CompanyThemeData,
home: new Scaffold(
@aponxi
aponxi / sql-mongo_comparison.md
Last active December 12, 2024 01:11
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@diorahman
diorahman / client.html
Created December 26, 2011 03:34
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');