This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __git_ps1 (){ | |
| GIT_BRANCH=$(git branch 2>/dev/null | grep '^* ' | cut -c 3-) | |
| if [ -n "$GIT_BRANCH" ]; then | |
| GIT_STATUS=$(git status | grep "nothing to commit") | |
| if [ -z "$GIT_STATUS" ]; then | |
| # printf " $Red($GIT_BRANCH)$Color_Off" | |
| printf "\033[31m ($GIT_BRANCH)\033[0;00m" | |
| else | |
| printf "\033[32m ($GIT_BRANCH)\033[0;00m" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| # -*- coding: utf8 -*- | |
| """Utility to sanitize some warez movies filename""" | |
| __author__ = "Felix Yadomi" | |
| __version__ = "0.0.3" | |
| __email__ = "[email protected]" | |
| import sys, os, re | |
| from titlecase import titlecase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'digest/md5' | |
| def md5_rename_file(filepath) | |
| newname = Digest::MD5.file(filepath).hexdigest + File.extname(filepath) | |
| puts filepath + ' -> ' + newname | |
| File.rename(filepath, newname) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'nokogiri' | |
| require 'reverse_markdown' | |
| require 'date' | |
| ARTICLE_PATH='/Users/yadomi/Desktop/data/articles/*.xml' | |
| def title doc | |
| doc.at('title').text | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "-> Generate locale..." | |
| update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 | |
| echo "-> Updating packages informations..." | |
| apt-add-repository -y ppa:brightbox/ruby-ng >/dev/null 2>&1 | |
| apt-get -y update 2>&1 >> /var/log/provision.log | |
| echo "-> Installing build-essential..." | tee -a /var/log/provision.log | |
| apt-get -y install build-essential zlib1g-dev 2>&1 >> /var/log/provision.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo "\nHello, I will make your Mac awesome" | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
| echo "-------------------------" | |
| echo "| Binaries |" | |
| echo "-------------------------" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SSID=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}') | |
| WALLPAPERS="/Users/yadomi/Dropbox/Applications/WallCentral" | |
| WALLPAPER=$(find $WALLPAPERS -type f -not -path '*/\.*' -not -path '*Icon*' | shuf -n 1) | |
| WALLPAPER_FALLBACK="$WALLPAPERS/a495ebd47cd4e0404b272eaea6cedb23.jpg" | |
| if [ -z $SSID ]; then | |
| exit | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.wayPoint = function(options) { | |
| return this.each(function(){ | |
| var $this = $(this); | |
| options = $.extend({ | |
| upOffset: 0, | |
| downOffset: 0 | |
| }, options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.stickMe = function(options) { | |
| return this.each(function() { | |
| var $this = $(this); | |
| function onScroll() { | |
| var topToElementStart = $this.offset().top - (options.startOffset + options.offset); | |
| var topToViewportTop = $(window).scrollTop(); | |
| var topToViewportBottom = $(window).scrollTop() + $(window).height(); | |
| var topToElementEnd = $this.offset().top + options.height; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LIBS := $(wildcard lib/*.js) | |
| SOURCE_JS := inject.es6 | |
| BUILD_JS := dist/inject.min.js | |
| SOURCE_CSS := inject.css | |
| BUILD_CSS := dist/inject.min.css | |
| UGLIFYJS := ./node_modules/uglify-js/bin/uglifyjs | |
| BABEL := ./node_modules/babel-cli/bin/babel.js |
OlderNewer