Skip to content

Instantly share code, notes, and snippets.

@pmaoui
pmaoui / Maoui.vim
Created October 24, 2014 18:06
Maoui.vim
" Vim color file - maoui
" Generated by http://bytefluent.com/vivify 2014-10-23
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
@pmaoui
pmaoui / .tmux.conf
Last active November 9, 2015 08:49
Tmux & Vim configuration
# remap prfix to ctrl+a
#set -g prefix C-a
#unbind C-b
#bind C-a send-prefix
# window splitting
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
@pmaoui
pmaoui / lastc.sh
Last active November 3, 2015 12:16
Execute one of your last 5 history commands with one key
#!/bin/bash
# run with: history -a && ./lastc.sh
clear
echo "Use \"history -a\" before to populate ~/.bash_history with your current history"
sleep 2
last5=$(cat ~/.bash_history |tail -n6 |head -n1 |xargs echo -n)
last4=$(cat ~/.bash_history |tail -n5 |head -n1 |xargs echo -n)
last3=$(cat ~/.bash_history |tail -n4 |head -n1 |xargs echo -n)
last2=$(cat ~/.bash_history |tail -n3 |head -n1 |xargs echo -n)
@pmaoui
pmaoui / theme-jenkins-cs.css
Last active March 16, 2017 17:44
Theme Jenkins ContentSquare
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjRjQ0MzM2IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtMmgydjJ6bTAtNGgtMlY3aDJ2NnoiLz48L3N2Zz4=)}[src$="yellow.png
@pmaoui
pmaoui / tsconfig.json
Last active February 1, 2018 16:59
AngularJS to Angular5 — Upgrading a large application
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noStrictGenericChecks": true,
"lib" : ["es2015", "dom"],
@pmaoui
pmaoui / systemjs.config.ts
Created February 1, 2018 16:59
AngularJS to Angular5 — Upgrading a large application
(function (global) {
const pathPrefix = (typeof window !== 'undefined' ? '/' : './');
System.config({
baseURL: '/dist',
defaultJSExtensions: true,
paths: {
// paths serve as alias
'npm:*': pathPrefix + 'node_modules/*'
},
// map tells the System loader where to look for things
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule } from '@angular/upgrade/static';
@NgModule({
imports: [
BrowserModule,
UpgradeModule
]
})
export class AppModule {
import 'zone.js';
import 'reflect-metadata';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
import { NgAboutComponentClass } from "./mycomp.ng.component";
.state({
name: 'mynewroute',
url: '/mynewroute',
component: NgAboutComponentClass
});
@pmaoui
pmaoui / chenv.sh
Last active February 19, 2018 13:54
#!/bin/zsh
UXA_CONFIG="$WORKSPACE/mousetest/app/config/parameters.dev.yml"
PP_CONFIG="$WORKSPACE/project-parameters/conf/env.json"
CAF_CONFIG="$WORKSPACE/cs-app-feature/conf/env.json"
environnements=(dev future next1 next2 next3 next4 next5 staging Quit)
select opt in "${environnements[@]}"
do
case $opt in