Skip to content

Instantly share code, notes, and snippets.

View vrthra's full-sized avatar

Rahul Gopinath vrthra

View GitHub Profile
#!/bin/bash
# Convert a live CD iso so that it's bootable off of a USB stick
# Copyright 2007 Red Hat, Inc.
# Jeremy Katz <katzj@redhat.com>
#
# overlay/persistence enhancements by Douglas McClendon <dmc@viros.org>
# GPT+MBR hybrid enhancements by Stewart Adam <s.adam@diffingo.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@dhakkada
dhakkada / companion
Created September 13, 2012 18:58
Life and Companion
Someone, somewhere is made for you....
I had known this when I was a teenager. It was such a romantic and beautiful
feeling while nervously and curiously trying to know who that someone was!
Time passes and we grow. Yet, to believe that someone is just for you really
matters. In my journey it was a quest which was fulfilled eventually. Today,
when I think about my someone I feel so special. Day by day I feel attached to
this individual. When I think of other couples I bet those are the same feelings.
Most of us do get to meet someone who makes us feel that they are made of us.
Again the time passes and we grow. Sometimes these relationships changes, new
dynamics are encountered and we get a different frame of reference for the same
@kylog
kylog / gist:7cff4f2eac5683de32d9
Last active August 29, 2015 14:02
FreeBSD installs for native facter
# these packages are new enough
pkg install git
pkg install cmake
pkg install boost-libs
# build/install yaml-cpp b/c the one provided by 'pkg' is too old
pkg install wget
wget https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
tar xzvf https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
cd yaml-cpp
@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@cheery
cheery / leo_algorithm.py
Created November 13, 2015 01:49
Leo algorithm?
from structures import *
# This is described in the marpa thesis.
# could someone check out that it's correct?
# Joop Leo presented a method for dealing with right
# recursion in O(n) time. With his modification, earley
# algorithm is O(n) for all LR-regular grammars.
# spot potential right recursions and memoize them.
# Leo restricts the memoization to where right recursion
@theSage21
theSage21 / regex-engine.py
Created May 14, 2016 07:24
A very simple regular expression engine for learning purposes
# Define some special things
SPECIAL = '*|'
ALPHABET = '10'
EPSILON = None
# functions
def automaton_print(automaton):
"Neatly prints the automaton"
states, alphabet, start, final, transfer = automaton
print('STATES : ', states)
@martinlindhe
martinlindhe / gdb.rb
Created June 29, 2016 21:51 — forked from Congee/gdb.rb
For gdb to execute python3 script on OSX 10.10 or later
class UniversalBrewedPython < Requirement
satisfy { archs_for_command("python").universal? }
def message; <<-EOS.undent
A build of GDB using a brewed Python was requested, but Python is not
a universal build.
GDB requires Python to be built as a universal binary or it will fail
if attempting to debug a 32-bit binary on a 64-bit host.
EOS
@guedou
guedou / GhidraDecompiler.java
Last active March 3, 2022 10:39
Call the Ghidra decompiler from the command line
// Copyright (C) 2019 Guillaume Valadon <guillaume@valadon.net>
// This program is published under a GPLv2 license
/*
* Decompile a function with Ghidra
*
* analyzeHeadless . Test.gpr -import $BINARY_NAME -postScript GhidraDecompiler.java $FUNCTION_ADDRESS -deleteProject -noanalysis
*
*/
I want you to play the role of a human scientist and put forward a guess of an explanation for some phenomena that you have never heard before. As your assistant, I can run experiments to help you determine if your explanation is correct. Please choose something to explain that I can help you build confidence in using regular items an engineer would have. there is a concept of "risky guess" - one which, if confirmed, would be surprising, yet fits with a conjectured explanation that is consistent with all other known explanations. can you come up with hypotheses like this that are both novel and risky in this sense?
Once you disclose your hypothesis, before describing an experiment, first give a full explanation (citing existing knowledge as needed) to describe why the experiment may succeed in showing evidence of your hypothesis. Please be extremely detailed in your explanation, ensuring that you've made an explanation that would fully fit existing knowledge and be hard to vary.