Skip to content

Instantly share code, notes, and snippets.

@marcosscriven
marcosscriven / prcoessfile.txt
Created March 13, 2013 21:36
Test case for Emscripten. In native code this will continue on to next line, but in Javascript, it runs forever with the given input.
A
1
B
C
3
Despite the commit I'm cherry picking not touching the 3rdparty dir at all, I get this merge issue:
On branch master
Your branch is up-to-date with 'origin/master'.
You are currently cherry-picking commit 6c7143d.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Changes to be committed:
@marcosscriven
marcosscriven / gist:c748a098419fd65855c0
Last active August 29, 2015 14:23
Start Chrome in app mode
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app=http://www.bbc.co.uk/iplayer
# Couldn't get this to work if you already have a profile running
# open -b com.google.Chrome --args --app=http://www.bbc.co.uk/iplayer
package com.myco.codestyle;
import com.intellij.codeInsight.actions.OptimizeImportsProcessor;
import com.intellij.codeInsight.actions.ReformatCodeProcessor;
import com.intellij.ide.impl.ProjectUtil;
import com.intellij.ide.plugins.PluginManager;
import com.intellij.idea.IdeaApplication;
import com.intellij.idea.Main;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ApplicationStarter;
List of downloads:
http://osxdaily.com/2012/07/12/list-download-history-mac-os-x/
Special attributes for Gatekeeper:
http://ilostmynotes.blogspot.co.uk/2012/06/gatekeeper-xprotect-and-quarantine.html
brew list and brew cask list
list of all the software you've manually installed by downloading:
sqlite3 com.apple.LaunchServices.QuarantineEventsV2 'select LSQuarantineOriginURLString, LSQuarantineDataURLString from LSQuarantineEvent' | egrep "\.dmg|\.pkg|\.iso|\.zip"
@marcosscriven
marcosscriven / browser.js
Last active February 14, 2016 19:28
Example of subscribing to Navetas Loop websockets, either in the browser console, or in a Node script. In the latter case should see output like this:
// Serial and secret can be scraped from summary page
var server = 'https://www.your-loop.com';
$.getScript('https://www.your-loop.com/socket.io/socket.io.js').done(function() {
socket = io.connect(server);
console.log('Connected to socket');
socket.on('connect', function() {
socket.emit("subscribe_electric_realtime", {
serial: '00000000xxxxx',
clientIp: '127.0.0.1',
secret: 'xxxxxxxxxx'
@marcosscriven
marcosscriven / build-rtldriver-for-kamikaze.sh
Last active May 25, 2016 19:13
Build the open source patched driver for Kamikaze
#! /bin/bash
# It takes an age to unpack the headers on the BBB
apt-get update
apt-get install dkms linux-headers-4.1.6-bone15
git clone https://github.com/pvaret/rtl8192cu-fixes.git
# Install
dkms add ./rtl8192cu-fixes
dkms install 8192cu/1.10
[System]
[Geometry]
# Cartesian XY
axis_config = 0
# Set the total length each axis can travel [meters]
travel_x = 0.20
travel_y = 0.20
travel_z = 0.190
@marcosscriven
marcosscriven / cgpt
Last active July 21, 2017 20:02
Failed live boot logs
localhost mnt # cgpt show /dev/sda
start size part contents
0 1 PMBR (Boot GUID: 525005C5-7CF9-3D4A-981E-9664C750C0FA)
1 1 Pri GPT header
2 32 Pri GPT table
3559424 8192 1 Label: "STATE"
Type: Linux data
UUID: 62339F0E-5378-5C4C-8CD5-37F297EB8299
20480 32768 2 Label: "KERN-A"
Type: ChromeOS kernel
# List of LG domains the LG TV connects to
0.0.0.0 eic-ngfts.lge.com
0.0.0.0 gb.ibs.lgappstv.com
0.0.0.0 gb.ibsstat.lgappstv.com
0.0.0.0 gb.lgtvsdp.com
0.0.0.0 gb.rdx2.lgtvsdp.com
0.0.0.0 lgtvonline.lge.com
0.0.0.0 snu.lge.com