Skip to content

Instantly share code, notes, and snippets.

View smilesun's full-sized avatar

Xudong Sun smilesun

View GitHub Profile
#!/usr/bin/python3
# Python 3 changes hash seeds upon interpreter start.
# https://docs.python.org/3/reference/datamodel.html#object.__hash__
#
# This was to fix the following vulnerability:
# http://ocert.org/advisories/ocert-2011-003.html
#
# For non-web apps, the hash non-determinism between interpreter runs
# can be fixed by setting an env var:
@rob-murray
rob-murray / add_intellij_launcer
Last active April 10, 2024 15:42
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@sckott
sckott / run.md
Last active April 15, 2018 07:17
Shiny - how to make footer stick to bottom of page

run by doing

library(shiny)
runGist('5694313')
@ryin
ryin / tmux_local_install.sh
Last active April 23, 2024 01:06
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8