Skip to content

Instantly share code, notes, and snippets.

View fcsonline's full-sized avatar

Ferran Basora fcsonline

View GitHub Profile
@impressiver
impressiver / raven-config.html
Last active June 28, 2024 05:30
Raven.js configuration for logging JavaScript exceptions to Sentry (https://getsentry.com/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
<!-- Raven.js Config -->
<script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script>
<script type="text/javascript">
// Ignore list based off: https://gist.github.com/1878283
var ravenOptions = {
// Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion.
// See: https://github.com/getsentry/raven-js/issues/73
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',
@Nihhaar
Nihhaar / linux_performance.md
Created September 18, 2017 18:42 — forked from marianposaceanu/linux_performance.md
Linux simple performance tweaks

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler

[noop] deadline cfq

# SWAP The fcsonline way
# First make yourself sudo like this
sudo su
# The copy these lines in the console
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
@ericfreese
ericfreese / git-rewrite
Last active July 5, 2022 20:16
Git script to rewrite history in various ways
#!/bin/env zsh
# Run an interactive rebase, automatically marking $1 to be reworded
function git_rewrite_reword() {
GIT_SEQUENCE_EDITOR="sed -ie 's/pick $1/reword $1/'" \
git rebase -i --autostash $1^
}
# Run an interactive rebase, automatically marking $1 to be edited
function git_rewrite_edit() {