Skip to content

Instantly share code, notes, and snippets.

@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
#
# Boxstarter script
# To install Boxstarter and run this script:
#
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Install-BoxstarterPackage -PackageName <RAW-GIST-URL> -DisableReboots
#
# Most of this was referenced from:
# - https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# - https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9
@carnal0wnage
carnal0wnage / DevOOPS: Attacks And Defenses For DevOps Toolchains Talk Links
Last active September 26, 2022 06:00
Links from Chris Gates/Ken Johnson DevOOPS RSA 17 presentation
@HarmJ0y
HarmJ0y / PowerView-2.0-tricks.ps1
Last active April 8, 2024 03:40
PowerView-2.0 tips and tricks
# NOTE: the most updated version of PowerView (http://www.harmj0y.net/blog/powershell/make-powerview-great-again/)
# has an updated tricks Gist at https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993
# get all the groups a user is effectively a member of, 'recursing up'
Get-NetGroup -UserName <USER>
# get all the effective members of a group, 'recursing down'
Get-NetGroupMember -GoupName <GROUP> -Recurse
# get the effective set of users who can administer a server
@squarism
squarism / linux_ksp.md
Last active September 15, 2023 16:23
Kerbal Space Program Linux Box

Kerbal Space Program on Linux

KSP is delaying the 64-bit windows port for a while, at least past 1.0. The 32-bit Windows KSP version is a bit cramped. You install too many mods and the game will crash. It's hard to work out the balance point. On the KSP forums and on reddit, sometime people suggest switching to Linux. Someone is having problems playing a game and someone basically suggests learning Unix. Then the thread dies.

Linux (even if you've used it for a decade) is hard. Especially getting all the things to work properly. I used three different distros until I got AMD video drivers to work correctly and even now I'm not sure. You can have an easy time installing Linux. Maybe you got lucky on your hardware. Having a bad time in Linux is crazy-pants-party-time. You have to know a lot of commands just to collect information on what is going on.

Try a sprinkle of empathy.

So I wrote down what I did since I'm wiping my Linux partition over and over again. I hope this helps someone. Maybe

@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@JonnyJD
JonnyJD / Makefile
Created July 31, 2013 22:16
traversing the I/O registry on Mac OS X (iokit)
traverse_io_registry: traverse_io_registry.c
${CC} $^ -framework CoreFoundation -framework IOKit -o $@
@torsten
torsten / proxy.rb
Last active April 30, 2024 17:53
A quick HTTP proxy server in Ruby.
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,