Skip to content

Instantly share code, notes, and snippets.

@snzip
snzip / oracle_database_schema_tables_views.sql
Created May 24, 2019 06:59 — forked from luzfcb/oracle_database_schema_tables_views.sql
sql for introspection information about schema, tables, views and other for various database
-- basic doc: http://docs.oracle.com/cd/B19306_01/network.102/b14266/admusers.htm#i1008832
-- get all database schema's name from Oracle Database
-- http://www.orafaq.com/wiki/List_of_default_database_users
-- http://www.adp-gmbh.ch/ora/misc/known_schemas.html
SELECT DISTINCT OWNER
FROM ALL_OBJECTS
WHERE OWNER NOT IN ('APEX_030200', 'CTXSYS', 'DBSNMP', 'EXFSYS',
'MDSYS', 'OLAPSYS', 'ORDDATA', 'ORDPLUGINS',
'ORDSYS', 'PUBLIC', 'SYS', 'SYSTEM', 'WMSYS',
@snzip
snzip / install_sqlplus.md
Created May 8, 2019 08:48 — forked from tcnksm/install_sqlplus.md
How to install oracle client to Ubuntu 12.04

Install SQL*Plus

  1. Download .rpm package here
    • oracle-instantclinet*-basic-*.rpm
    • oracle-instantclinet*-devel-*.rpm
    • oracle-instantclinet*-sqlplus-*.rpm
  2. Install alien (sudo apt-get install alien)
  3. Convert the rpm files and install
    • sudo alien -i oracle-instantclinet*-basic-*.rpm
  • sudo alien -i oracle-instantclinet*-devel-*.rpm
@snzip
snzip / gist:1ccb2896910fcdaab052026e8603e5de
Last active April 7, 2019 13:03
多文件读取,附加文件名
for ext in js json wxss wxml; do
/bin/find . -type f -name "*.$ext" -print | while read filename; do
echo -e $"//----$filename\r\n"
echo -e $"//\r\n"
echo -e $"// Copyright Weizhong Inc. All rights reserved.\r\n"
echo -e $"//\r\n"
cat "$filename"
echo -e $"\r\n"
done
@snzip
snzip / check custom protocol
Created November 1, 2018 14:26
check custom protocol
define("function-widget-1:download/util/downloadCommonUtil.js", function(e, t, n) {
var o = e("base:widget/libs/jquerypacket.js"),
r = e("function-widget-1:download/service/dlinkService.js"),
i = e("base:widget/tools/service/tools.flash.js"),
s = e("function-widget-1:download/util/context.js").getContext,
a = {
getFlashVersion: function() {
var e = 0,
t = navigator;
if (t.plugins && t.plugins.length) {
@snzip
snzip / README.md
Created October 17, 2018 16:08 — forked from aaronk6/README.md
launchUri

Cross-browser implementation of navigator.msLaunchUri

Microsoft’s navigator.msLaunchUri method only works in Internet Explorer on Windows 8. Therefore I came up with a (nearly) cross-browser implementation that uses the native msLaunchUri when it’s available and falls back to adventurous hacks when running in other browsers.

Description

launchUri (uri, successCallback, noHandlerCallback, unknownCallback)
@snzip
snzip / esp8266-smart-config.ino
Created October 7, 2018 04:15 — forked from anoochit/esp8266-smart-config.ino
esp8266-smart-config
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
void setup() {
int cnt = 0;
// set for STA mode
WiFi.mode(WIFI_STA);
// put your setup code here, to run once:
@snzip
snzip / rsa_encryption.java
Created August 9, 2018 13:30
how to encrypt & decrypt with RSA in Java
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import javax.crypto.Cipher;
public class Sample {
@snzip
snzip / gist:0372d8581ac6b2544e216c4d8bf27997
Created July 31, 2018 11:25
Gradle issue on maven project
org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.13-bin.zip' #36
<groupId>org.fortasoft</groupId> <artifactId>gradle-maven-plugin</artifactId> <version>1.0.8</version> <configuration> <gradleInstallationDir>${env.GRADLE_HOME}</gradleInstallationDir> </configuration>
@snzip
snzip / gitproxy-socat
Created July 31, 2018 02:06 — forked from sit/gitproxy-socat
A simple wrapper around socat to use as a git proxy command
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
@snzip
snzip / LICENSE
Created July 3, 2018 05:56 — forked from gouthambs/LICENSE
Flask token based authentication
The MIT License
Further resources on the MIT License
Copyright 2014 Gouthaman Balaraman
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.