Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki
This file contains 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
##Server: | |
sudo apt-get update && apt-get upgrade | |
sudo apt-get install screen nodejs nodejs-legacy git npm | |
sudo npm install websocket | |
git clone https://github.com/samyk/poisontap | |
screen | |
sudo node backend_server.js | |
##piZero: | |
sudo apt-get update && apt-get upgrade |
This file contains 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
// file: index.js | |
var _ = require("lodash"); | |
var express = require("express"); | |
var bodyParser = require("body-parser"); | |
var jwt = require('jsonwebtoken'); | |
var passport = require("passport"); | |
var passportJWT = require("passport-jwt"); |
This file contains 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 React, { Component } from 'react' | |
import { runSaga, delay } from 'redux-saga' | |
import { take, put, call } from 'redux-saga/effects' | |
// helper functions | |
const bindFunc = (comp, method) => (...args) => method.apply(comp, args) | |
const bindSaga = (comp, method) => (...args) => runSaga(method.apply(comp, args), {}) | |
export default class Counter extends React.Component { |
This file contains 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
# PyMean ?2008, Kenneth Reitz | |
def main(): | |
mean(GetNumbers()) | |
def GetNumbers(): | |
number_list = [] | |
input_number = False | |
while input_number != "": |
This file contains 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
# enable ES6 | |
parserOptions: | |
ecmaVersion: 6 | |
sourceType: "module" | |
ecmaFeatures: | |
jsx: true # enable React's JSX | |
# register plugins | |
plugins: | |
- meteor |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>XcodeDusk</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
This file contains 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 "regenerator/runtime" | |
import { take, put, cps } from "redux-saga" | |
import { GraphQL } from "../../graphql" | |
import { auth } from "../../methods" | |
import { addSaga } from "../utilities" | |
import actions from "./actions" | |
// Check for availibilty of account |
This file contains 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
// Only trigger enclosing computation if the return value of | |
// f is not EJSON.equals to the previuous return value | |
Tracker.guard = function(f) { | |
if (Meteor.isServer || !Tracker.currentComputation) { | |
return f(); | |
} | |
let dep = new Tracker.Dependency(), | |
curView = Blaze.currentView, | |
tplFunc = Template._currentTemplateInstanceFunc; |
This file contains 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
#!/bin/bash | |
# Stop all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ] ; then | |
docker stop $containers | |
fi | |
# Delete all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ]; then | |
docker rm -f -v $containers |
NewerOlder