Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / linux-setup.sh
Last active April 27, 2024 10:05
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@xpn
xpn / invoke-shellcode.ps1
Created November 15, 2015 23:24
Calls invoke-shellcode.ps1 upon load with a reverse meterpreter shell, and connects to meterpreter.local on port 443
function Invoke-Shellcode
{
<#
.SYNOPSIS
Inject shellcode into the process ID of your choosing or within the context of the running PowerShell process.
PowerSploit Function: Invoke-Shellcode
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 10:08
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@XenoPanther
XenoPanther / Windows ReFS versions.en.md
Last active April 27, 2024 10:02 — forked from 0xbadfca11/00_README.md
Windows ReFS versions

Version number is reported by fsutil fsinfo refsinfo, available on Windows 10 and Windows Server 2016.

ReFS 1.1

  • Version of formatted by Windows Server 2012.
  • Version 1.1 is used already in Windows Server 8 Beta. I have never seen version 1.0.
  • Can use and store alternate data streams, when mount on 8.1/2012 R2 or later.

ReFS 1.2

  • Version of formatted by Windows 8.1, Windows 10 v1507 to v1607, Windows Server 2012 R2, and when specified ReFSv1 on Windows Server 2016 or later.
  • Cannot use alternate data streams, when mount on 2012.
@aldous-rey
aldous-rey / getCentralizationAllTypes.py
Created September 1, 2017 13:23
NetworkX function to get centralization (for a network) from centrality (degree, closeness, betweenness, eigenvector)
def getCentralization(centrality, c_type):
c_denominator = float(1)
n_val = float(len(centrality))
print (str(len(centrality)) + "," + c_type + "\n")
if (c_type=="degree"):
c_denominator = (n_val-1)*(n_val-2)
@rotexdegba
rotexdegba / center-jquery-dialog.php
Last active April 27, 2024 10:01
Centering a JQuery Dialog
<script type="text/javascript">
//<![CDATA[
jQuery.noConflict();
jQuery(
function() {
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
//jQuery( "#dialog:ui-dialog" ).dialog( "destroy" );
jQuery( "#dialog-form" ).dialog({
autoOpen: false,
height: 600,
@vishal2376
vishal2376 / FlipAnimation.kt
Created April 25, 2024 17:16
Card Flip Animation using Jetpack Compose
package com.vishal2376.animations.ui.theme
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.EaseInOut
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@meain
meain / loading_messages.js
Last active April 27, 2024 09:54
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",