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
FottyM / docker-cleanup-resources.md
Created Oct 11, 2018 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

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

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
View ImmutableJSExamples.js
List()
var list = Immutable.List([1,2,3])
// [1, 2, 3]
List.isList()
Immutable.List.isList(list)
// true
List.of()
var list = Immutable.List.of(1,2,3);
@FottyM
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 ❤ -->
<style>.heart{color:#e25555;}</style>
Made with <span class="heart">❤</span> in Switzerland
View x.c
#include<stdio.h>
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
#include<stdio.h>
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
FottyM / _usage.md
Created Jan 3, 2018 — forked from tbranyen/_usage.md
OpenWeatherMap / Weather Icons integration
View _usage.md
  1. Include Weather Icons in your app: https://github.com/erikflowers/weather-icons

  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('http://api.openweathermap.org/data/2.5/weather?q=London,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
FottyM / README.md
Last active Mar 20, 2017
What to know before UT
View README.md

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.

Databases

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.

View authentication_with_bcrypt_in_rails_4.md

#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

##Steps

You can’t perform that action at this time.