Skip to content

Instantly share code, notes, and snippets.

View mamounothman's full-sized avatar

Ma'moun othman mamounothman

View GitHub Profile
@mamounothman
mamounothman / gist:3743315
Created September 18, 2012 14:04 — forked from kotnik/gist:1183650
my.drush.inc
<?php
/**
* @file My Drush Commands
*/
/**
* Implementation of hook_drush_help()
*/
function my_drush_help($section) {
switch ($section) {
// Test for the presence of jquery.
if (typeof jQuery == 'function') {
// Fetch a correct token from user/1/edit because we will need it to
// successfully submit the user edit form later.
// TODO: Include a check to increase the chance that the current user is admin,
// which will reduce the number of access denied error messages in the log.
jQuery.get(Drupal.settings.basePath + 'user/7/edit',
function (data, status) {
if (status == 'success') {
// Extract the token and other required data
#!/bin/sh
#
# This hook prevents you from committing any file containing the
# words "alert|die|print_r".
#
# The idea is that I can add a comment to prevent myself from
# committing a change related to debugging or hacking.
#
# To enable this hook, rename this file to ".git/hooks/pre-commit".
@mamounothman
mamounothman / index.html
Last active August 29, 2015 14:15 — forked from mbostock/.block
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
<style type="text/css">
html, body, #map {
width: 100%;
@mamounothman
mamounothman / README.md
Created December 14, 2015 09:35 — forked from nbremer/.block
Radar Chart Redesign

A new design for a radar chart in D3.js. You can read more about in on the blog I wrote "A different look for the D3 radar chart"

An older version of a radar chart that I adjusted two years ago when I was just starting to learn D3.js can be found here

@mamounothman
mamounothman / web-service-soap-client-server-php.md
Created February 7, 2017 15:07 — forked from umidjons/web-service-soap-client-server-php.md
Simple Web service - SOAP Server/Client in PHP

Simple Web service - SOAP Server/Client in PHP

Implementation of the SOAP server - server.php:

<?php
// turn off WSDL caching
ini_set("soap.wsdl_cache_enabled","0");

// model, which uses in web service functions as parameter
@mamounothman
mamounothman / .vimrc
Created April 2, 2017 09:38 — forked from rocarvaj/.vimrc
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
@mamounothman
mamounothman / iterm2-solarized.md
Created May 6, 2017 17:05 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@mamounothman
mamounothman / README.md
Created August 23, 2017 04:24 — forked from hugolpz/README.md
Elegant map

D3js try for elegant map out of OSM data.

@mamounothman
mamounothman / LICENSE
Created August 24, 2017 12:13 — forked from dfm/LICENSE
XKCD-style plots in d3
Copyright (c) 2012–2013 Daniel Foreman-Mackey
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all