Skip to content

Instantly share code, notes, and snippets.

View footballqq's full-sized avatar

Smile Jack footballqq

View GitHub Profile
@footballqq
footballqq / psString2MD5.ps1
Created August 3, 2017 05:15
windows powerscript string hash md5
#https://gallery.technet.microsoft.com/scriptcenter/Get-StringHash-aa843f71
#add Param and output to the function above source.
#usage .\Get-StringHash "My String to hash" "MD5"
#also a file hash in the sourcebelow
#http://jongurgul.com/blog/get-stringhash-get-filehash/
#how to enable excute ps in win10
#https://www.tenforums.com/tutorials/54585-change-powershell-script-execution-policy-windows-10-a.html
#simple: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
@footballqq
footballqq / macroforfilldown
Last active June 6, 2017 04:57
Excel Marco for filldown(act like double click filldown) Excel宏,能代替双击单元格右下角的功能,向下填充
#from: Bill Manville replied on August 18, 2010See post history
#MVP Insider MCC: Content Creator
#https://answers.microsoft.com/en-us/office/forum/office_2007-excel/shortcut-key-for-fill-handle/b839e82b-72f1-4631-9463-f92d62387d64
#https://support.office.com/en-us/article/Copy-your-macros-to-a-Personal-Macro-Workbook-aa439b90-f836-4381-97f0-6e4c3f5ee566
#also: http://dmcritchie.mvps.org/excel/fillhand.htm
Sub FillHandle()
If IsEmpty(ActiveCell.Value) Then Exit Sub
@footballqq
footballqq / table2csv
Last active May 12, 2017 04:10
table2csv
#https://oracle-base.com/articles/9i/generating-csv-files
#https://pandazen.wordpress.com/2008/02/01/export-oracle-query-result-to-csv/
#https://oracle-base.com/dba/script?category=miscellaneous&file=csv.sql
#MEMO: if the text col has \n \r, the function will break.
Here the simple procedure to do it,
CREATE OR REPLACE function DUMP_CSV(P_QUERY IN VARCHAR2,
@footballqq
footballqq / jupyter.py
Last active April 10, 2017 11:50
Ipython Jupyter Notebook
this shoud be best
http://stackoverflow.com/questions/30492623/using-both-python-2-x-and-python-3-x-in-ipython-notebook
conda create -n py27 python=2.7 ipykernel
conda create -n py36 python=3.6 ipykernel
other ways:
http://stackoverflow.com/questions/28831854/how-do-i-add-python3-kernel-to-jupyter-ipython
@footballqq
footballqq / removenonprint.py
Created April 10, 2017 03:47
remove non printable chars and non filename chars from string
fileName = re.sub('[^\w\s-]', '.', fileName).strip().lower()
#will replace non printable chars to "."
@footballqq
footballqq / plsqlchncode.txt
Created March 24, 2017 06:09
PLSQL Developer 复制中文后粘贴乱码问题
来源:http://honda418.iteye.com/blog/425514 @honda418
plsql developer, Version 7.x, 在查询结果集中,想复制中文,但是却出现乱码。(结果显示中文是好的)
一开始怀疑是oracle字符集的问题,仔细检查了后发现字符集并没有问题,后面比较了2个版本的setting,还是找不到任何不同之处。
参考这篇可以解决 http://tech.163.com/05/0824/15/1RUBED1E00091589.html
祝:原文说的win98,但我都win10了一样是这个问题。
==============================================华丽的分割线=============================================
@footballqq
footballqq / pycharm python file header
Last active July 8, 2023 20:47
pycharm python file header
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#@Filename : ${NAME}
#@Date : ${YEAR}-${MONTH}-${DAY}-${HOUR}-${MINUTE}
#@Project: ${PROJECT_NAME}
#@AUTHOR : footballqq