Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔

smac89

🤔
View GitHub Profile
@contato318
contato318 / linuxprivchecker.py
Created July 14, 2017 16:13 — forked from sh1n0b1/linuxprivchecker.py
linuxprivchecker.py -- a Linux Privilege Escalation Check Script
View linuxprivchecker.py
#!/usr/env python
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.
@smac89
smac89 / fpr.py
Last active May 10, 2020 08:01
Floating point regex: A regular expression to match any valid python floating point value.
View fpr.py
# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
# See it in action https://regex101.com/r/ObowxD/5
import re
regex = r"""
(?xm)
(?:\s|^)
([-+]*(?:\d+\.\d*|\.?\d+)(?:[eE][-+]?\d+)?)
@smac89
smac89 / ObservableStack.java
Last active January 24, 2021 11:53
A simple implementation of a JavaFX observable stack
View ObservableStack.java
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Smac89
*
* 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, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@Sudheer-Reddy
Sudheer-Reddy / webpack.config.js
Last active April 12, 2021 14:57
Copy static assets in Webpack
View webpack.config.js
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
const PATHS = {
src: path.join(__dirname, 'src'), //absolute path to RepoDir/src
dist: path.join(__dirname, 'dist') //absolute path to RepoDir/dist
}
module.exports = {
entry: {
//Webpack will automatically resolve it to RepoDir/src/js/index.js (if file name is not specified)
@davidandrzej
davidandrzej / regex-unapply.scala
Created June 22, 2012 00:23
Scala regex unapply magic
View regex-unapply.scala
scala> val myRegex = """Foo=([0-9]+) Bar=([A-Z]+)""".r
myRegex: scala.util.matching.Regex = Foo=([0-9]+) Bar=([A-Z]+)
scala> "Foo=123 Bar=ABC" match {
| case myRegex(foo, bar) =>
| println("foobar looks like %s-%s".format(foo,bar))
| case _ => println("not a match")
| }
foobar looks like 123-ABC
@beci
beci / gcc 5 on ubuntu 14.04
Created October 15, 2015 07:18
use gcc 5.x on ubuntu 14.04
View gcc 5 on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
@trungly
trungly / simple_server.py
Last active September 22, 2022 20:50
A simple Python HTTP server that supports a GET that echoes some request data and a POST that reads a request body, parses it as JSON and responds with part of the data
View simple_server.py
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse, json
class GetHandler(BaseHTTPRequestHandler):
def do_GET(self):
parsed_path = urlparse.urlparse(self.path)
message = '\n'.join([
'CLIENT VALUES:',
'client_address=%s (%s)' % (self.client_address,
@thoop
thoop / .htaccess
Last active December 5, 2022 13:35
Official prerender.io .htaccess for Apache.
View .htaccess
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@santisbon
santisbon / Search my gists.md
Last active January 10, 2023 04:45
How to search gists
View Search my gists.md

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@btroncone
btroncone / rxjs_operators_by_example.md
Last active January 23, 2023 19:19
RxJS 5 Operators By Example
View rxjs_operators_by_example.md