Skip to content

Instantly share code, notes, and snippets.

View ohookins's full-sized avatar
🤔
Thinking

Oliver Hookins ohookins

🤔
Thinking
View GitHub Profile
@seanhandley
seanhandley / docker-compose.yml
Last active June 7, 2024 19:25
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@axe312ger
axe312ger / css-ninja.md
Last active July 30, 2018 10:20
I try to gather here all information to get your css knowledge to a higher level

Become a CSS ninja with reading a few links I gathered here!

There is so many information about css in the internet but most of the stuff, is totally non-sense and is just misleading people into copy & pasting bullshit where they don't understand why it is are working.

This is one of the biggest issues of frontend design! Thats why so many designs/websites fail. Especially cross-browser.

It is just a little you need to know, to truely understand how css is working. I hope these informations from other wonderful authors help you to improve yourself and make frontend and css work less painfull

@whoshuu
whoshuu / curlget.cpp
Created March 31, 2015 06:44
Example libcurl GET request
#include <curl/curl.h>
#include <string>
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string* data) {
data->append((char*) ptr, size * nmemb);
return size * nmemb;
}
int main(int argc, char** argv) {
auto curl = curl_easy_init();
@ianblenke
ianblenke / es_pri_allocate_unassigned.md
Last active November 18, 2021 00:14
elasticsearch trying to allocate a primary shard which is disabled

Allow routing allocations:

curl -XPUT localhost:9200/_cluster/settings -d '{
                "transient" : {
                    "cluster.routing.allocation.enable" : "all"
                }
        }'
@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing
@john45traver
john45traver / autoscrolling.js
Created June 23, 2014 16:10
Endless looping of scrollview
var Engine = require("famous/core/Engine");
var Surface = require("famous/core/Surface");
var Scrollview = require('famous/views/Scrollview');
mainContext = Engine.createContext();
scrollview = new Scrollview({direction:0});
var surfaces = [];
@amcgregor
amcgregor / _laws.md
Last active February 3, 2022 22:42
Alice's Laws

Alice's Laws

  1. You can only count on yourself.
  2. Never reveal more than you have to.
  3. Execution is nine-tenths of the job.
  4. Give credit where credit is due.
  5. When all else fails, do it yourself.
  6. 90% of a project takes 90% of the time.
  7. The remaining 10% takes an additional 90% of the time.
  8. Never date a co-worker.
@andrequeiroz
andrequeiroz / holtwinters.py
Last active July 5, 2023 07:50
Implementation of Holt-Winters algorithms in Python 2
#The MIT License (MIT)
#
#Copyright (c) 2015 Andre Queiroz
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@JosephPecoraro
JosephPecoraro / shell-execution.rb
Last active September 10, 2023 10:12
Shell Execution in Ruby
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Synchronous (blocking)
# Returns the output of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111