-
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
-
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
-
Connect PS3 controller to Mac with USB cable.
-
Enable Bluetooth.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Accessor<T> { | |
public String getData(); | |
} | |
public class ClassA { | |
private String superAwesomeData = "Woah."; | |
public String getSuperAwesomeData() { return this.data; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "opencv2/highgui/highgui.hpp" | |
#include "opencv2/core/core.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/imgproc/imgproc_c.h" | |
#include "opencv2/legacy/legacy.hpp" | |
#include <iostream> | |
using namespace cv; | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; K-means Clustering | |
(defun diff-sq (x y) | |
(expt (- x y) 2)) | |
(defun squared-differences (l1 l2) | |
(mapcar (lambda(x y) (float (expt (- x y) 2))) l1 l2)) | |
(defun sum-squared-differences (l1 l2) | |
(reduce #'+ (squared-differences l1 l2))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"it may be much worse than others." | |
"Again we are not better servants." | |
"on a keyboard mouse movements and physical bumps." | |
"to include the preceding decision node and yes at the Science Museum of London 53 370- 418." | |
"there must be substantial positive and it computes answers." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/b4866d7d6ede0b545753 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char **argv) { | |
short *shortp = 0; | |
int index = 1; | |
printf("%X\n", &shortp[index]); | |
printf("%X\n", &index[shortp]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WebSocket demo</title> | |
</head> | |
<body> | |
<script> | |
var url = new URL(window.location); | |
var c = url.searchParams.get("c"); | |
var p = url.searchParams.get("p"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import inspect | |
import unittest | |
import unittest.mock | |
from . import patch | |
class EnhancedMock(unittest.mock.Mock): | |
""" An enhanced mock object that supports a wider array of mock patching than the base framework. |
OlderNewer