Skip to content

Instantly share code, notes, and snippets.

View mrcaron's full-sized avatar
👾
Typing typing typing

Michael Caron mrcaron

👾
Typing typing typing
View GitHub Profile
@nileshtrivedi
nileshtrivedi / home-server.md
Last active January 10, 2024 06:30
Home Server setup: Raspberry PI on Internet via reverse SSH tunnel

Raspberry Pi on Internet via reverse SSH tunnel

HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615

I already have my own domain name: mydomain.com. I wanted to be able to run some webapps on my Raspberry Pi 4B running perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok would work but the free plan is too restrictive.

I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.

@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@mrcaron
mrcaron / Radman_Dev_Box.ps1
Last active October 19, 2020 21:11
Radman Dev Box
# use http://bit.ly/radboxstarter4 as the link to this raw file
# Before using this script, make sure to turn on developer mode and insider builds and restart.
Set-WindowsExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Install-WindowsUpdate
#Enable-RemoteDesktop
cinst -y chocolatey
cinst -y googlechrome
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@fredkingham
fredkingham / ko-binding-scroll.js
Created October 2, 2012 11:27
knockout infinite scrolling
ko.bindingHandlers.scroll = {
updating: true,
init: function(element, valueAccessor, allBindingsAccessor) {
var self = this
self.updating = true;
ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
$(window).off("scroll.ko.scrollHandler")
self.updating = false
@cmer
cmer / gist:3157850
Created July 22, 2012 01:16
Spam on Quora
Sam John sent you a message on Quora
Sam John said:
"Greetings to you and your family,
my came is Barr. Samora Johnson. I’m personal Attorney to late (Mr Victor .A. Mercier)a nationality of your country, who bear the same surname with yours. died in heart attack after the death of his wifi and only daughter in a car accident, in Benin Republic West Africa on 21st April 2008. (May their gentle souls rest in perfect peace) without anyone to claim his Fund.USD12.5M deposit in the Security bank.
The Bank has issued me an ultimatum to present the next-of-kin of the deceased to inherit the funds to my late client; I have made several enquiries to your embassy here to locate any of my clients extended relatives in his home country,
I decided to contact you hence I know that you bear the same surname with him.
@peternixey
peternixey / securing_rails_updates.md
Created March 5, 2012 13:10
How Homakov hacked GitHub and how to protect your application by Peter Nixey

##How Homakov hacked GitHub and the line of code that could have prevented it


Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at peternixey.com.

If you'd like to follow me on twitter my handle is @peternixey