Skip to content

Instantly share code, notes, and snippets.

View nnamdei's full-sized avatar
💭

namdi nnamdei

💭
View GitHub Profile
@slightfoot
slightfoot / bottom_nested_nav.dart
Created May 4, 2022 18:05
Bottom Nested Nav - by Simon Lightfoot :: #HumpdayQandA :: 4th May 2022
import 'package:flutter/material.dart';
void main() {
runApp(const App());
}
@immutable
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
@petronioamaral
petronioamaral / AWS_error_cURL_error_60.md
Created December 7, 2020 19:29
Solution: Error executing "PutObject" on AWS HTTP error: cURL error 60 localhost

Solution: Error executing "PutObject" on AWS HTTP error: cURL error 60 localhost

Folder: vendor\guzzlehttp\guzzle\src\Client.php

Change verify to false.

$defaults = [ 'allow_redirects' => RedirectMiddleware::$defaultSettings, 'http_errors' => true, 'decode_content' => true,

@chaiwa-berian
chaiwa-berian / Step 1: Create API User.MD
Last active July 18, 2025 19:19
Testing MTN MoMo Collection API in Sandbox using Postman

A. Checklist

  • To create an API User, you need the following things in place: X-Reference-Id and Ocp-Apim-Subscription-Key

1. X-Reference-Id

  • This is used as User ID since the Sandbox is a Mock Environment so we kinda create our own ids and send them over to the sandbox so it can uniquely identify the user
  • Get the value for this here: https://www.uuidgenerator.net/api/version4
  • Remember to keep this safely as we will use it when configuring our POST request
  • Lets say you have your X-Reference-Id as: 9f92971b-cd2e-4feb-9053-0b14d53ac4f5

2. Ocp-Apim-Subscription-Key

  • Get this from the Primary or Secondary Key of your Collections | Enable remote collection of bills, fees or taxes subscription.
@crimsonsuv
crimsonsuv / bottom_sheet_fix.dart
Created November 29, 2018 07:02
Flutter Modal bottom sheet whith input fix and full screen sheet
//Flutter Modal Bottom Sheet
//Modified by Suvadeep Das
//Based on https://gist.github.com/andrelsmoraes/9e4af0133bff8960c1feeb0ead7fd749
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
const Duration _kBottomSheetDuration = const Duration(milliseconds: 200);
@calistatee
calistatee / python_twitter_sentiment_analysis.txt
Last active January 9, 2024 08:59
Python: Twitter and Sentiment Analysis
import tweepy
import csv
from urlextract import URLExtract
from textblob import TextBlob
# log in via codes provided by Twitter
consumer_key = 'enter your consumer key'
consumer_secret = 'enter your consumer secret key'
access_token = 'enter your access token'
import Vue from 'vue';
import posts from './components/posts.vue';
window.axios = require('axios');
window.Vue = Vue;
Vue.component('posts', posts);
const app = new Vue({
el: '#app',
from buckets.fields import S3FileField
from datetime import datetime, timezone, timedelta
from django.conf import settings
from django.db import models
from django.dispatch import receiver
from django.utils.translation import ugettext as _
from django.core.mail import send_mail
from django.template.loader import render_to_string
import django.contrib.auth.models as auth
import django.contrib.auth.base_user as auth_base
@patidardhaval
patidardhaval / README.md
Last active June 1, 2024 14:31
Node Rest api using hapi and mysql

NodeRestful

Create Node Restful APIs with MySQL Database

Install Node JS and MySQL Software, create a database and import SQL file.

Go to terminal or command line.

Execute following commands to run this application.

Start Project

@randallreedjr
randallreedjr / heroku-remote.md
Last active May 29, 2025 19:19
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git