Skip to content

Instantly share code, notes, and snippets.

View keglostephane's full-sized avatar

KEGLO DODZI keglostephane

  • ivory coast / abidjan
View GitHub Profile
@pitrk
pitrk / _mock_file_with_string.md
Last active November 15, 2023 13:34
Mock file with string in Python

Mock file with string in Python

This is an example on how to mock a file with string.

Use case

Testing a function which opens a file and does some kind of operation on it.

About the example

@derekbtw
derekbtw / create-script.sh
Created April 14, 2017 14:37
Bash script to create a header for bash scripts
#!/bin/bash -
#title :mkscript.sh
#description :This script will make a header for a bash script.
#author :bgw
#date :20111101
#version :0.4
#usage :bash mkscript.sh
#notes :Install Vim and Emacs to use this script.
#bash_version :4.1.5(1)-release
#==============================================================================
@CrazyMath
CrazyMath / models.py
Last active June 27, 2020 21:06
Singleton Model
from django.db import models
from django.core.cache import cache
class SingletonModel(models.Model):
class Meta:
abstract = True
def delete(self, *args, **kwargs):
pass
@svetlemodry
svetlemodry / .gemrc
Created February 28, 2016 17:49
Jekyll on Fedora
gem:
--bindir ~/.local/bin
--no-ri --no-rdoc