Skip to content

Instantly share code, notes, and snippets.


Fortunat Mutunda FottyM

Block or report user

Report or block FottyM

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
FottyM /
Created Oct 11, 2018 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
View ImmutableJSExamples.js
var list = Immutable.List([1,2,3])
// [1, 2, 3]
// true
var list = Immutable.List.of(1,2,3);
FottyM / made-with-love.html
Created Feb 17, 2018 — forked from oliveratgithub/made-with-love.html
Various HTML-snippets to add "Made with love" to your website
View made-with-love.html
<!-- Example #1 - no styling -->
Made with ❤ in Switzerland
<!-- Example #2 - inline-styled ❤ -->
Made with <span style="color: #e25555;">&#9829;</span> in Switzerland
Made with <span style="color: #e25555;">&hearts;</span> in Switzerland
<!-- Example #3 - CSS-style class for ❤ -->
Made with <span class="heart">❤</span> in Switzerland
View x.c
int is_prime(int num)
if (num <= 1) return 0;
if (num % 2 == 0 && num > 2) return 0;
for(int i = 3; i < num / 2; i+= 2)
if (num % i == 0)
return 0;
View num.c
int main()
int y,i,num;
printf("Enter the number of integers you need:");
scanf(" %d", &y);
int r1[y];
printf("Enter a number:");
scanf(" %d", &num);
for( i=1; i<=y; i++){
FottyM /
Created Jan 3, 2018 — forked from tbranyen/
OpenWeatherMap / Weather Icons integration
  1. Include Weather Icons in your app:

  2. Include the below JSON in your application, for example purposes, lets assume it's a global named weatherIcons.

  3. Make a request to OpenWeatherMap:

req = $.getJSON(',uk&callback=?');
View sol.sol
contract Process_0g28l4d_Contract {
uint tokens = 1;
uint subprocesses = 0;
uint hours_before_checking_72_time = 0;
uint Checkout_date_time = 0;
function hours_before_checking_72(uint localTokens) internal returns (uint) {
hours_before_checking_72_time = now;
return localTokens & uint(~2) | 4;
View code.sol
pragma solidity ^0.4.0;
contract Process_0g28l4d_Contract {
uint tokens = 1;
uint hours_before_checking_72_time = 0;
uint Checkout_date_time = 0;
function accept_request() returns (bool) {
uint localTokens = tokens;
if (localTokens & 4194306 != 4194306)
FottyM /
Last active Mar 20, 2017
What to know before UT

UT/TTU Software Engineering

What to know

Take one Lnaguage and make it your bestfriend

Know at least one OOP Language, I'd suggest java Codecademy should have something there if not try Javabrains you should have everything you need to cover that. Go beyong hello world build even a terminal app but with many classes and stuff so that you just get used to the language. Because if you know one language to learn the rest is very easy.


Everything we do always has a database and it will always have one. Make sure you inderstand databases very well. At least the basics and you can write SQL queries by yourself.


#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault


You can’t perform that action at this time.