Skip to content

Instantly share code, notes, and snippets.

You are happy owner of macbook with new os and dream to play favorite new games via Steam or old-school via emulators...
And in one day you checked Amazon and WOW - PS gamepad copy only for 12$?! Awesome! "Shut up and take my money!"©
You aren't stupid and googled first, that macOS supports ps gamepads from scratch - Double-Awesome!
And here is that day - you opened gamepad box and followed instruction https://theultralinx.com/2014/02/connect-playstation-3-controller-mac-os-mavericks/ or http://osxdaily.com/2014/12/28/connect-playstation-3-controller-mac-os-x/
But... NOTHINK WORKS!!! Oh my god! Is your controller is a fake?!
PATIENCE!
OS: mac OS Sierra / Hight Sierra
Controller: DualShock 3 PANHAI
@Cezarion
Cezarion / gist:5925e0a5af9b6436560c
Last active August 29, 2015 14:25 — forked from jnweaver/gist:4e1d9ee41610308c7756
Wordpress Composer example
{
"name" : "uwmadison-umark/wordpress-skeleton",
"description" : "Skeleton WordPress Stack via Composer",
"authors" : [
{
"name" : "Nick Weaver",
"email" : "[email protected]",
"homepage": "http://umark.wisc.edu"
}
],

OS X Preferences


#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
<?php
define('VOCAB_MACHINE_NAME', 'verticals');
function case_studies_install() {
_create_vocabulary();
$terms = array(
array(
/**
* jQuery alterClass plugin
*
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
*
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
*
*/
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
/**
* Console.log with call location and grouping to reduce log noise.
* Apply directly to code once.
*
* Original: http://remysharp.com/2014/05/23/where-is-that-console-log/
*/
var groupable = typeof console.groupCollapsed !== 'undefined';
['log', 'warn'].forEach(function(method) {
var old = console[method];
console[method] = function() {
/**
* Prepare the App Folder
*/
(function(){
window.appRootDirName = ".myapp";
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("device is ready");
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@Cezarion
Cezarion / app.js
Created May 14, 2014 16:48 — forked from jgoux/app.js
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
<?php
/**
* Transforms an under_scored_string to a camelCasedOne
*/
function camelize($scored) {
return lcfirst(
implode(
'',
array_map(