Skip to content

Instantly share code, notes, and snippets.

View daltonnyx's full-sized avatar
🦥

Quy Truong daltonnyx

🦥
  • Saigon Technology
  • Da Nang
View GitHub Profile
@daltonnyx
daltonnyx / FilesUploadViewController.cs
Last active July 1, 2017 04:07
C# XAF List Editor Note
// To customize ListEditor, we need to hook PagePreRender from ViewController to make sure every Editor has been created.
// Refer: https://www.devexpress.com/Support/Center/Question/Details/Q574048
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Editors;
#https://jeremywagner.me/blog/bulk-image-optimization-in-bash
find ./ -type f -name '*.jpg' -exec jpeg-recompress -n 30 -x 75 -l 128 -a -s -c {} {} \;
#Use iw to scan wifi
iw wlp7s0 scan
#get SSID then use wpa_passphase to generate config for that wifi
wpa_passphase <ssid> > ./output.conf
#use wpa_supplicant to connect wifi
wpa_supplicant -B -D wext -i wlp7s0 -c ./output.conf
# -B for background running
# -D select driver for wifi. wext is generic
document.addEventListener('touchstart', handleTouchStart, false);
document.addEventListener('touchmove', handleTouchMove, false);
document.addEventListener('touchend', handleTouchEnd, false);
var xDown = null;
var yDown = null;
function handleTouchStart(evt) {
if(evt.originalEvent != undefined) {
<div id="cfacebook">
<a href="javascript:;" class="chat_fb" onclick="return:false;"><i class="fa fa-facebook-square"></i> Phản hồi của bạn</a>
<div class="fchat">
<div class="fb-page" data-tabs="messages" data-href="https://www.facebook.com/syphuongsmarthome/" data-width="250" data-height="400" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="false"></div>
</div>
</div>
<style>#cfacebook{position:fixed;bottom:0px;right:100px;z-index:999999999999999;width:250px;height:auto;border-top-left-radius:5px;border-top-right-radius:5px;overflow:hidden;}#cfacebook .fchat{float:left;width:100%;height:270px;overflow:hidden;display:none;background-color:#fff;}#cfacebook .fchat .fb-page{margin-top:-130px;float:left;}#cfacebook a.chat_fb{float:left;padding:0 25px;width:250px;color:#fff;text-decoration:none;height:40px;line-height:40px;text-shadow:0 1px 0 rgba(0,0,0,0.1);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAqCAMA
//http://stackoverflow.com/questions/670774/how-can-i-solve-a-connection-pool-problem-between-asp-net-and-sql-server#670842
You can specify minimum and maximum pool size by specifying MinPoolSize=xyz and/or MaxPoolSize=xyz in the connection string. This cause of the problem could be a different thing however.
XpoProvider=MSSqlServer;Data Source=.\SQLEXPRESS;User ID=sa;Password=●●●●●●●●;Initial Catalog=360plus;MaxPoolSize=1000
//increase user connections SQL Server
//https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-user-connections-server-configuration-option
USE AdventureWorks2012 ;
GO
EXEC sp_configure 'show advanced options', 1;
GO
<VirtualHost *:80>
ServerName myproject.192.168.33.10.xip.io
DocumentRoot /var/www/myproject/public
<Directory /var/www/myproject/public>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
grep -Por --include="*.php" ';global\$|/etc/passwd|\$GLOBALS\[.+\]|="base64_decode";return|ALREADY_RUN_|if\(md5\(\$_GET\[|eval\(str_rot13|\.str_rot13|eval\(base64_decode|eval\(stripslashes\(|=htmlentities\(\$_POST\[|Visualizzazione|\$password\!=\$config_password|edoced_46esab|\$_SERVER\[SCRIPT_FILENAME\]|preg_replace\("/\.|preg_replace\("\\|\@extract\(\$_REQUEST|error_reporting\(0\)|\)\."\\x|CEH-VHG-ANBU|/\@move_uploaded_file\(|getcwd|base64_decode\(\$_GET|\.iconv\(|\$s\.
=\$v|jquery\.min\.php| "ev"\."al\(|$_SERVER\(“’”HTTP_X_FORWARDED_FOR|assert\(\$a|str_replace\(\”ZZZ\”|\$sui79|\$karz06|\$wordpress1|Check25Port\(\)|\$OO_O_00O_0=urldecode|(?:str_replace|\$\w+)\("(.+)",(?:\s+)*"",(?:\s+)*".+?\1.+?"\)|k7ce69693|\$xmfe34|eval.*\(.+\)|curlget\(\$\w+\)|@\$F&&@\$F|extract\(.*POST.*\)' ./ > /home/shell_pattern.txt
var binaryData = atob("");//Base64 Data here);
var saveData = (function () {
console.log('Savedata');
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function (data, fileName) {
var json = JSON.stringify(data),
blob = new Blob([binaryData], {type: "application/octet-stream"}),