Skip to content

Instantly share code, notes, and snippets.

View Sharaf5's full-sized avatar
🏠
Working from home

Abdelaziz Sharaf Sharaf5

🏠
Working from home
View GitHub Profile
@Calinou
Calinou / update-git.sh
Last active July 8, 2023 23:25
Updates all Git repositories in a directory
#!/bin/bash
# Copyright (c) 2015 Calinou
# CC0 1.0 Universal
# <https://creativecommons.org/publicdomain/zero/1.0/>
update() {
for d in "$@"; do
test -d "$d" -a \! -L "$d" || continue
cd "$d"
@Calinou
Calinou / insaneBump.py
Created March 9, 2015 22:34
InsaneBump GIMP plugin (licensed under GPLv3)
#! /usr/bin/env python
from gimpfu import *
import commands
import glob
import os
import string
import subprocess
suffixes = (['diffuse', '_d'], ['specular', '_s'], ['normal', '_n'], ['height', '_h'], \
@ideefixe
ideefixe / browser_detect.js
Created January 30, 2013 18:11
Detect Browsers, Versions, Mobile, Desktop, and OS with Javascript
var BrowserDetect = {
init: function() {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
var dataProp = data[i].prop;