Skip to content

Instantly share code, notes, and snippets.

View ichtrojan's full-sized avatar
🔺
The Nothing

Michael Okoh ichtrojan

🔺
The Nothing
View GitHub Profile
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@FredericJacobs
FredericJacobs / gist:3977102
Created October 29, 2012 23:00
Leaked Internal Apple Email about Forstall leaving

Team,

We are in one of the most prolific periods of innovation and new products in Apple’s history. The amazing products that we’ve introduced in September and October – iPhone 5, iOS6, iPad mini, iPad, iMac, MacBook Pro, iPod touch, iPod nano and many of our applications – could only have been created at Apple, and are the direct result of our relentless focus on tightly integrating world-class hardware, software and services.

Today, I am announcing changes that will encourage even more collaboration between our world-class hardware, software and services teams at all levels of our company. As part of these changes, Jony Ive, Bob Mansfield, Eddy Cue, and Craig Federighi will be taking on more responsibilities. I am also announcing that Scott Forstall will be leaving Apple next year and will serve as an advisor to me during the interim. I want to thank Scott for all of his many contributions to Apple over his career.

Jony Ive will provide leadership and direction for Human Interface (HI) across the company

@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active June 14, 2024 17:01
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@alghanmi
alghanmi / curl_example.cpp
Created May 5, 2014 20:12
cURL C++ Example
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
@tbrianjones
tbrianjones / Inflect.php
Last active February 21, 2024 21:28
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
@adamgibbons
adamgibbons / install-mongodb.md
Last active January 17, 2023 15:17
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@joepie91
joepie91 / asynchronous.js
Last active November 29, 2021 11:16
PHP vs Node.js: Synchronous vs Asynchronous
console.log("Before the first file is read.");
hypotheticalFileGetContents("sample.txt", function(fileContents){
// fileContents now contains the file contents, this function is only called when the file read in the background has finished
console.log("After the first file has completed reading.");
});
// You've now told it to start the first read, but it won't 'block' your script execution. It will do the read in the background, and immediately move on with the rest of your code.
console.log("Before the second file is read.");
hypotheticalFileGetContents("sample2.txt", function(fileContents){
@mandiwise
mandiwise / Update remote repo
Last active July 11, 2024 17:32
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@nadar
nadar / PostMessageToSlackChannel.php
Last active June 5, 2024 17:05
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit:
*
* 1.) Create an APP -> https://api.slack.com/apps/
* 2.) See menu entry "Install App"
* 3.) Use the "Bot User OAuth Token"
import React, { Component } from 'react'
import { Router, Route, Link, IndexRoute, hashHistory, browserHistory, DefaultRoute } from 'react-router'
class App extends Component {
render () {
return (
<Router history={hashHistory}>
<Route path='/' component={Container}>
<IndexRoute component={Home} />
<Route path='address' component={Address} />