Skip to content

Instantly share code, notes, and snippets.

View AntonAL's full-sized avatar

Anton AntonAL

View GitHub Profile
@CMCDragonkai
CMCDragonkai / wework_wifi_on_linux_with_nmcli.md
Last active December 11, 2024 17:21
WeWork WiFi on Linux with `nmcli`

WeWork WiFi on Linux

When using nmcli device wifi connect 'WeWorkWiFi' password '...', you'll get something like:

Error: Failed to add/activate new connection: Failed to determine AP security information

To actually use it, you need to create a connection first and configure it:

@bfolkens
bfolkens / postgres_counter_cache.sql
Last active November 8, 2023 17:21
PostgreSQL Counter Cache
-- Courtesy
-- http://shuber.io/porting-activerecord-counter-cache-behavior-to-postgres/
CREATE FUNCTION increment_counter(table_name text, column_name text, id integer, step integer)
RETURNS VOID AS $$
DECLARE
table_name text := quote_ident(table_name);
column_name text := quote_ident(column_name);
conditions text := ' WHERE id = $1';
updates text := column_name || '=' || column_name || '+' || step;
@CMCDragonkai
CMCDragonkai / ssh_vpn.md
Last active September 15, 2024 17:57
SSH VPN #cli

SSH VPN

Here's an example of setting up a basic point to point VPN using SSH tunnels.

First you need a server in the cloud that isn't behind a NAT.

Ensure that the host and server has port 22 open and is running sshd.

If you're using AWS, make sure to check your security groups.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ilyaigpetrov
ilyaigpetrov / Meteor Alternatives Per Feature.md
Last active September 15, 2024 20:21
Meteor Alternatives Per Feature | by https://git.io/ilyaigpetrov

Meteor Alternatives Per Feature

This table was created in 2015 so may be quite outdated today.

Feature Meteor Solution Alternative Solutions Description
Live DB Sync [livequery][lq] ([mongo-oplog]), [ddp] RethinkDB, Redis, ShareDB, [npm:mongo-oplog], [firebase], etc. Push DB updates to client/server.
Latency Compensation, Optimistic UI [minimongo][mm] [RethinkDB][lcr], [mWater/minimongo] (fork, not ws but http, browserify) Imitate successful db query on client before it is done.
Isomorphic Code [isobuild] & isopacks browserify Write one code for server/client/mobile.
Isomorphic Packaging [isobuild], atmosphere No more separate packages for server & client. Get bower + npm + mobile.