Skip to content

Instantly share code, notes, and snippets.

View murwa's full-sized avatar
💭
Veni vidi vici

Peter Murwa murwa

💭
Veni vidi vici
  • ZyroAfrica
  • Kasarani, Kenya
  • X @_mxgel
View GitHub Profile
@theodorosploumis
theodorosploumis / Install_Phpstorm.sh
Last active June 16, 2022 11:15
Update phpstorm on Ubuntu linux.
#!/bin/bash -e
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
# Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
# For stable releases try: https://data.services.jetbrains.com/products/download?code=PS&platform=linux
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
@vyspiansky
vyspiansky / remove-script-tags.php
Created October 23, 2014 09:28
PHP: delete all script tags from text
<?php
preg_replace('#<script(.*?)>(.*?)</script>#is', '', $html_text);
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@gido
gido / macosx-install-php-oracle-oci8.md
Last active June 1, 2021 08:49
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8 - homebrew environnement

Installation

This procedure is tested on Mac OS X 10.8 with Developpers tools installed (xCode).

PHP 5.4 installed with Homebrew.

Update: I wrote a blog post about this.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@tototoshi
tototoshi / rownum.sql
Created December 26, 2012 01:14
Grouped LIMIT in PostgreSQL: show the first N rows for each group
-- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group
-- http://www.postgresql.jp/document/9.2/html/tutorial-window.html
CREATE TABLE empsalary (
depname varchar(10) not null
, empno integer not null
, salary integer not null
);
INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200);
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"