Skip to content

Instantly share code, notes, and snippets.

View johngorithm's full-sized avatar
🏠
Working from home

Johngorithm johngorithm

🏠
Working from home
View GitHub Profile
import android.content.Context;
import java.io.File;
public class CacheManager {
/**
* Private Constructor to make this a Utility class.
*/
private CacheManager() {
// Private constructor

To view all files in your project that are ignored by Git without looking into .gitignore file, run the command below

git ls-files --others --ignored --exclude-standard

The link below show how one can change a repository's remote link from the command line.

This is essentially important when switching form either HTTPS TO SSH or vice-versa

Learn More

To remove staged file staging with Git, follow the link below

Stack Overflow

To undo a commit and return the changes back to staging. Use the command blow

git reset --soft HEAD^

@johngorithm
johngorithm / shadow.xml
Created September 15, 2019 14:27 — forked from lecho/shadow.xml
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"

First

git fetch --all

Next

git reset --hard origin/<feature-branch>

Command for deleting flutter lock file.

This is essentially useful when one is blocked on Waiting for another flutter command to release the startup lock...

On the flutter root folder, run: rm ./flutter/bin/cache/lockfile

https://stackoverflow.com/questions/46377667/docker-for-mac-mkmf-rb-cant-find-header-files-for-ruby
@johngorithm
johngorithm / loading_and_displaying_pages_of_data.dart
Last active August 26, 2020 09:27
Comment/Code - How to load and display pages of network data.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {