Skip to content

Instantly share code, notes, and snippets.

View guemidiborhane's full-sized avatar
👷‍♂️
Pretending to work on something important

Borhaneddine Guemidi guemidiborhane

👷‍♂️
Pretending to work on something important
View GitHub Profile
{
"1": {
"name": "\u00c5land Islands",
"fullname": "\u00c5land Islands",
"iso_3166_2": "AX",
"iso_3166_3": "ALA",
"capital": "Mariehamn",
"citizenship": "\u00c5land Islander",
"currency": "euro",
"currency_code": "EUR",
# Base image
FROM ubuntu:14.04
# Put my hand up as maintainer
MAINTAINER Borhane Eddine Guemidi <guemidiborhane@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN \
apt-get update && \
if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then
ZSH_THEME_CLOUD_PREFIX='☁'
fi
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
}
prompt_prefix() {
echo -n "%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX "
}
prompt_dir() {
@guemidiborhane
guemidiborhane / tmuxme
Created February 5, 2016 23:28
This is my setup for working on rails projects in vi and tmux. Thanks to http://www.tofu.org/drupal/node/183 for inspiration. If it isn't a rails project, just open the directory with default tmux stuff.
#!/bin/bash
#
# Usage: tmuxme
# creates a tmux session with the name of the current directory
# if the current directory is a rails project, sets up 3 windows:
# server, console, and vim.
#
SESSION=$(basename $(pwd))
Elixir = require('laravel-elixir')
config = Elixir.config
browserify = require('browserify')
gulp = require('gulp')
source = require('vinyl-source-stream')
path = require('path')
coffeeify = require('coffeeify')
###
# This task run the given coffee files through browserify
let obj = {}
let file = require('fs').readFileSync(__dirname + '/../../../../.js.env', 'utf8')
file.toString().split('\n').forEach(function (line) {
// matching "KEY' and 'VAL' in 'KEY=VAL'
var keyValueArr = line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/)
// matched?
if (keyValueArr != null) {
var key = keyValueArr[1]
// default undefined or missing values to empty string
(function (file) {
var fs = require('fs'),
_ = require('underscore');
if (fs.existsSync(file)) {
_.mixin({
deepExtend: require('underscore-deep-extend')(_)
});
_.deepExtend(elixir.config, JSON.parse(fs.readFileSync(file, 'utf8')));
#include <stdio.h>
int main(void) {
int a,b, op;
op = 5;
printf("Enter the value of A: ");
scanf("%i", &a);
printf("Enter the value of B: ");
scanf("%i", &b);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define MAX_STR_SIZE 20
#define PERSONS_TO_SAVE_FILE "evacuation_plan.txt"
enum zipcode
@guemidiborhane
guemidiborhane / main.c
Created October 24, 2018 06:38
morse-decoder-encoder
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
static const char *alpha[] = {
".-", //A
"-...", //B
"-.-.", //C
"-..", //D