- https://github.com/enochtangg/quick-SQL-cheatsheet - A quick reminder of all relevant SQL queries and examples on how to use them.
- https://dbdiagram.io/ - A free and simple tool to draw ER diagrams by just writing code.
byte[] buffer = Encoding.UTF8.GetBytes(text); | |
var ms = new MemoryStream(); | |
using (var zip = new GZipStream(ms, CompressionMode.Compress, true)) | |
{ | |
zip.Write(buffer, 0, buffer.Length); | |
} | |
ms.Position = 0; | |
var compressed = new byte[ms.Length]; | |
ms.Read(compressed, 0, compressed.Length); |
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2014-12-18 08:35:46" build="141216"> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""%ProgramFiles(x86)%\Git\bin\sh.exe" --login -i"/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Git bash}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> | |
<value name="StartFarEditors" type="hex" data="00"/> |
{"lastUpload":"2021-08-30T02:26:20.541Z","extensionVersion":"v3.4.3"} |
var countryNameToCode = { | |
'Afghanistan': 'AF', | |
'Aland Islands': 'AX', | |
'Albania': 'AL', | |
'Algeria': 'DZ', | |
'American Samoa': 'AS', | |
'Andorra': 'AD', | |
'Angola': 'AO', | |
'Anguilla': 'AI', | |
'Antarctica': 'AQ', |
user www-data; | |
worker_processes 2; | |
worker_rlimit_nofile 8192; | |
events { | |
worker_connections 4096; | |
multi_accept on; | |
use epoll; | |
} |
server { | |
root /path/to/app/public; | |
index index.php; | |
server_name test.dev; | |
set $cors_headers "whatever-custom-headers,you-would-like"; | |
# redirection to index.php | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; |
// ==UserScript== | |
// @name Choco-One-Click | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.1 | |
// @description Install software from chocolatey.org with one-click. This requires choco:// protocol support (choco install choco-protocol-support). | |
// @author AJ Steers | |
// @include http://*chocolatey.org/* | |
// @include https://*chocolatey.org/* | |
// @grant none | |
// ==/UserScript== |
<?php | |
add_action('plugins_loaded','ao_defer_inline_init'); | |
function ao_defer_inline_init() { | |
if ( get_option('autoptimize_js_include_inline') != 'on' ) { | |
add_filter('autoptimize_html_after_minify','ao_defer_inline_jquery',10,1); | |
} | |
} | |
function ao_defer_inline_jquery( $in ) { |
# Load Json into a Python object | |
import urllib2 | |
import json | |
req = urllib2.Request("http://localhost:81/sensors/temperature.json") | |
opener = urllib2.build_opener() | |
f = opener.open(req) | |
json = json.loads(f.read()) | |
print json | |
print json['unit'] |