Skip to content

Instantly share code, notes, and snippets.

View harryadel's full-sized avatar

Harry Adel harryadel

View GitHub Profile
@banjerluke
banjerluke / GroundedCollection.ts
Created December 1, 2021 14:41
GroundedCollection (rewrite of ground:db for Meteor 2.4+)
import Dexie from 'dexie';
import { EJSON } from 'meteor/ejson';
import type { Mongo } from 'meteor/mongo';
import type { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { throttle } from 'underscore';
import { PendingCounter } from './PendingCounter';
interface LocalCollectionInternal {
queries: Record<any, any>;
@litanur
litanur / readme.md
Last active April 12, 2024 15:25
Install MongoDB on Manjaro

How to install mongoDB on Manjaro 21 Ornara

  1. Enable AUR
  2. Make sure system is up to date sudo pacman -Syu
  3. To install, use the following command:
pamac build mongodb-bin
pamac build mongodb-tools-bin
pamac build mongodb-compass
@mrcomoraes
mrcomoraes / clear_cache_MS_Teams.sh
Last active February 16, 2024 22:55
Clear cache Microsoft Teams on Linux
#!/bin/bash
# This script cleans all cache for Microsoft Teams on Linux
# Tested on Ubuntu-like, Debian by @necrifede, Arch Linux by @lucas-dclrcq and Manjaro with flatpak by @danie1k. Feel free to test/use in other distributions.
# Tested Teams via snap package.
# Tested Teams via flatpak package.
#
# How to use in terminal:
# ./clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap | flatpak )
# or
@natevick
natevick / Dockerfile
Last active May 20, 2022 11:01
Base Rails Docker Development Environment
ARG RUBY_VERSION=2.6
FROM ruby:$RUBY_VERSION
ARG DEBIAN_FRONTEND=noninteractive
ARG NODE_VERSION=11
RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
@CaptainN
CaptainN / Meteor Basic useTracker.jsx
Last active September 2, 2021 16:54
Meteor Basic useTracker
import { useTracker } from 'meteor/react-meteor-data'
// Hook, basic use, everything in one component
const MyPage = (pageId) => {
const { user, isLoggedIn, page } = useTracker(() => {
// The publication must also be secure
const subscription = Meteor.subscribe('page', pageId)
const page = Pages.findOne({ _id: pageId })
return {
page,
@william8th
william8th / .tmux.conf
Last active April 30, 2024 17:03
Tmux open new pane in same directory
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
@musale
musale / remove.sh
Created June 20, 2017 14:46
Remove and re-install node on arch linux
sudo pacman -Rsc -n nodejs
sudo pacman -Sy nodejs
sudo pacman -Sy npm
@ipedrazas
ipedrazas / dump
Created April 22, 2017 04:10
Mongo dump/restore with docker
# Backup DB
docker run \
--rm \
--link running_mongo:mongo \
-v /data/mongo/backup:/backup \
mongo \
bash -c ‘mongodump --out /backup --host $MONGO_PORT_27017_TCP_ADDR’
# Download the dump
scp -r USER@REMOTE:/data/mongo/backup ./backup
@Kovrinic
Kovrinic / .gitconfig
Last active April 11, 2024 11:50
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@Davor111
Davor111 / sshuttle.sh
Created February 17, 2017 08:34
How to use sshuttle with .key, .csr or .pem files for authentication
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS:
sshuttle --dns -vr user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'