Skip to content

Instantly share code, notes, and snippets.

View lioneleoy's full-sized avatar
🏠
Working from home

lioneleoy

🏠
Working from home
View GitHub Profile
@lioneleoy
lioneleoy / mongo_to_csv.py
Created August 3, 2021 01:31 — forked from mieitza/mongo_to_csv.py
python mongo to csv use pandas.
# @Author: xiewenqian <int>
# @Date: 2016-11-28T20:35:09+08:00
# @Email: wixb50@gmail.com
# @Last modified by: int
# @Last modified time: 2016-12-01T19:32:48+08:00
import pandas as pd
from pymongo import MongoClient
@lioneleoy
lioneleoy / sid.py
Created April 14, 2021 12:35 — forked from danzek/sid.py
Return formatted SID string given list of integers containing SID from byte array
#!/usr/bin/env python
"""
Module containing class to parse and return formatted SID string given list of integers containing SID from byte array
This was made for formatting the CreatorSID from the Microsoft Windows CIM (WMI) repository database in the standard
Windows SID format ("S-1-5-21-<RID>-<RID>...). For instance, if using a script such as [`python-cim`](https://github.com/fireeye/flare-wmi/tree/master/python-cim)
[filter-to-consumer bindings](https://github.com/fireeye/flare-wmi/blob/master/python-cim/samples/show_filtertoconsumerbindings.py),
to extract CreatorSID using that script, you would add `'CreatorSID'` to the filter or consumer properties like so:
filter_sid = filter.properties["CreatorSID"].value
@lioneleoy
lioneleoy / code.gs
Created September 2, 2020 22:13 — forked from rmeekers/code.gs
Bulk Convert XLSX Files in Google Drive To Google Sheet
/*
* Setttings
*/
// Google Drive Folder ID which contains the Excel files you want to convert
var driveFolderId = '';
// Folder name in which we should place the original files after conversion
var sourceFilesFolderName = 'Source Files';
#!/usr/bin/env python
# coding: utf-8
#
# Copyright (C) Michael Ihde 2004 <mike.ihde@randomwalking.com>
#
# Distributed under the Python License
#
# iprange is a useful module that creates iprange generators similar
# to python's xrange. This allows you to write statements such as
#

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@lioneleoy
lioneleoy / bootstrap-panels-as-widgets.markdown
Created October 14, 2018 01:20
Bootstrap Panels as Widgets

Bootstrap Panels as Widgets

Expanding Bootstrap Panels for the Frameworx update. I also adding the ability to close/remove the widget if you so choose.

A Pen by Jennifer Perrin on CodePen.

License.

@lioneleoy
lioneleoy / index.html
Last active October 14, 2018 00:56
Responsive sidebar revealed on click and key press
<div class="nav-right visible-xs">
<div class="button" id="btn">
<div class="bar top"></div>
<div class="bar middle"></div>
<div class="bar bottom"></div>
</div>
</div>
<!-- nav-right -->
<main>
@lioneleoy
lioneleoy / index.html
Created October 12, 2018 17:04
Update Circular Gauge Data at Runtime - DevExtreme jQuery Gauges
<div class="dx-viewport demo-container">
<div id="gauge-demo">
<div id="gauge"></div>
<div id="seasons"></div>
</div>
</div>
@lioneleoy
lioneleoy / MultiThreading.ipynb
Created August 19, 2018 14:49
MultiThreading
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.