Skip to content

Instantly share code, notes, and snippets.

@eendeego
eendeego / bindings-cheat-sheet.md
Created November 28, 2012 10:26
Node/V8 bindings cheat sheet
@0xabad1dea
0xabad1dea / rsa-not-buying-it.md
Last active May 4, 2022 21:59
Sorry, RSA, I'm just not buying it

Sorry, RSA, I'm just not buying it

I want to be extremely clear about three things. First, this is my personal opinion – insert full standard disclaimer. Second, this is not a condemnation of everyone at RSA, present and past. I assume most of them are pretty okay, and that the problem is confined to a few specific points in the company. However, “unknown problem people making major decisions at RSA” is a bit unwieldy, so I will just say RSA. Third, I'm not calling for a total boycott on RSA. I work almost literally across the street from them and I don’t want to get beat up by roving gangs of cryptographers at the local Chipotle.

RSA's denial published last night is utter codswallop that denies pretty much everything in the world except the actual allegations put forth by Reuters and hinted at for months by [other sources](http://li

Apt

  • find package that belong to file dpkg -S /path/to/file

bash Net

  • find application that listen port 4200 lsof -i :4200

bash replace txt

sed -i -- 's/foo/bar/g' directory/*
find . -type f -exec sed -i 's/foo/bar/g' {} +
@drkarl
drkarl / gist:739a864b3275e901d317
Last active October 17, 2023 10:43
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 12, 2024 11:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
1. install openjdk
`sudo apt-get install openjdk-7-jdk`
2. install `android sdk`
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
@evaletolab
evaletolab / css.md
Last active April 25, 2019 08:05
css.md

image/content full width

.container {
  max-width:800px;
  width: calc( 100vw - 6rem );
  margin: 0 auto;
}
.image-fullwidth {
 max-width:100vw;
@evaletolab
evaletolab / angular.md
Last active May 30, 2018 07:07
angular2 help

Display

  • sudo prime-select intel
  • sudo service lightdm restart
  • sudo nano -w /etc/default/grub
    • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_rev_override=1 nouveau.modeset=0"

Network QCA6174

Solution 1

@anthonytxie
anthonytxie / hodl20.py
Created March 24, 2018 21:01
Hodl 20 Rebalancing Algorithm
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{