Skip to content

Instantly share code, notes, and snippets.

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

miad z miadz

🏠
Working from home
View GitHub Profile
=== General Commands
help # show this usage
version # show the gem version
list # list your apps
create [<name>] # create a new app
keys # show your user's public keys
keys:add [<path to keyfile>] # add a public key
@dogmatic69
dogmatic69 / bashrc.sh
Created October 19, 2010 18:27
make git prompt more useful
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@pjdonnelly
pjdonnelly / yql3leggedexample.php
Created November 8, 2010 07:55
Example of 3 legged OAuth with php/yql
<?php
include_once("lib/Yahoo.inc"); //located at https://github.com/yahoo/yos-social-php
//get your keys from https://developer.apps.yahoo.com/dashboard/createKey.html
define("API_KEY","<YOUR_KEY_HERE>");
define("SHARED_SECRET","<YOUR_SECRET_HERE>");
YahooLogger::setDebug(true); //optional debug output.
$session=YahooSession::requireSession(API_KEY, SHARED_SECRET);
@MasterEx
MasterEx / Coolphpobfuscator.java
Last active April 6, 2021 15:58
A PHP code obfuscator implemented in java as a proof of concept
package coolphpobfuscator;
import java.io.File;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@suprememoocow
suprememoocow / intercept.js
Created May 29, 2012 09:53
AJAX timing interceptor: this class intercepts all AJAX calls and records the time taken for the HTTP request to complete. These timings are posted back to the server in batches, if there are any to send, about every two seconds. Tested in Firefox, Chrome
(function(XHR) {
"use strict";
var stats = [];
var timeoutId = null;
var open = XHR.prototype.open;
var send = XHR.prototype.send;
@cosenary
cosenary / README.markdown
Last active December 29, 2017 06:59
Instagram PHP API - Working example: Load more button (AJAX)

Instagram PHP API

How to use

This a working example based on the previous posted workflow.
Feedback is as always welcome.

Original project repository: Instagram-PHP-API

index.php file

@iDiogenes
iDiogenes / gist:3231039
Created August 1, 2012 21:49
RADIUS with MySQL Support
Ubuntu MySQL & RADIUS Howto:
Install MySQL
# apt-get install mysql-server mysql-client
Secure MySQL
Mysql_secure_installation
@romeoh
romeoh / oauth.js
Created August 9, 2012 08:16
oauth.js
/*
* Copyright 2008 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@anchetaWern
anchetaWern / laravel-ums.markdown
Created December 6, 2012 11:14
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users