Skip to content

Instantly share code, notes, and snippets.

@shikendon
shikendon / ddos-mitigation-notes.md
Last active November 8, 2023 10:34
Best Practices for DDoS Protection and Mitigation on Linux
@michael34435
michael34435 / gce-vpn-install.sh
Last active July 24, 2017 02:45 — forked from greenido/gce-vpn-install.sh
Installing vpn on GCE
#!/bin/sh
#
# Automatic configuration of a VPN on GCE debian-7-wheezy server.
# Tested only on debian-7-wheezy.
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/
#
# Thx to: https://github.com/sarfata/voodooprivacy/blob/master/voodoo-vpn.sh for the code/idea
#
@mirague
mirague / CustomComponent-test.js
Last active November 9, 2021 09:32
Testing React-Intl components with Enzyme's mount() and shallow() methods. This is a helper function which wraps the `intl` context around your component tests in an easy and efficient way.
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js';
const wrapper = mountWithIntl(
<CustomComponent />
);
expect(wrapper.state('foo')).to.equal('bar'); // OK
expect(wrapper.text()).to.equal('Hello World!'); // OK
@btroncone
btroncone / rxjs_operators_by_example.md
Last active June 15, 2024 07:17
RxJS 5 Operators By Example
Extra Small
UICTFontTextStyleHeadline
.SFUIText-Semibold <UICTFont: 0x13e554c10> font-family: ".SFUIText-Semibold"; font-weight: bold; font-style: normal; font-size: 14.00pt
UICTFontTextStyleSubhead
.SFUIText-Regular <UICTFont: 0x13e5581b0> font-family: ".SFUIText-Regular"; font-weight: normal; font-style: normal; font-size: 12.00pt
UICTFontTextStyleBody
.SFUIText-Regular <UICTFont: 0x13e55cfd0> font-family: ".SFUIText-Regular"; font-weight: normal; font-style: normal; font-size: 14.00pt
@sgnl
sgnl / postgres-brew.md
Last active April 21, 2024 23:18
Installing Postgres via Brew (OSX) (outdated see top most note)

Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.

new out put may look like

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
@seyhunak
seyhunak / sidekiq.conf
Last active January 18, 2020 02:02
Sidekiq - Supervisord Configuration
/etc/supervisor/conf.d/sidekiq.conf
[program:sidekiq]
command=/usr/local/bin/sidekiq.sh
directory=/usr/local/bin/
user=ubuntu
startsecs=10
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/sidekiq.log

專案名稱: Rails新手村網站

主旨:收集 Rails 有用 Link

基本功能

@hanksudo
hanksudo / Front-end-Developer-Interview-Questions-TC.md
Last active September 12, 2024 07:05
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。

@ebeigarts
ebeigarts / nginx.conf
Created April 24, 2012 07:05
Mobile detection - iOS, other mobile platforms and desktop
daemon off;
error_log log/error.log crit;
events {
}
http {
uwsgi_temp_path tmp/;
scgi_temp_path tmp/;
proxy_temp_path tmp/;