Skip to content

Instantly share code, notes, and snippets.

View maslbl4's full-sized avatar

Sergei Smoliakov maslbl4

  • Saint-Petersburg
View GitHub Profile
@maslbl4
maslbl4 / curl_post_json.md
Created November 23, 2017 13:33 — forked from ungoldman/curl_post_json.md
post a file JSON file with curl

How do POST file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@maslbl4
maslbl4 / SetAssemblyInfoToVersion.ps1
Created April 21, 2016 16:42 — forked from derekgates/SetAssemblyInfoToVersion.ps1
Changes version information in AssemblyInfo.cs files recursively from a given path. I use this with TeamCity to control the version number as the built in Build Feature runs before my psake script can obtain the version (clearing out the version!).
# SetAssemblyVersion.ps1
#
# http://www.luisrocha.net/2009/11/setting-assembly-version-with-windows.html
# http://blogs.msdn.com/b/dotnetinterop/archive/2008/04/21/powershell-script-to-batch-update-assemblyinfo-cs-with-new-version.aspx
# http://jake.murzy.com/post/3099699807/how-to-update-assembly-version-numbers-with-teamcity
# https://github.com/ferventcoder/this.Log/blob/master/build.ps1#L6-L19
Param(
[string]$path=$pwd
)
@maslbl4
maslbl4 / base64.sql
Created December 8, 2015 15:14 — forked from vadviktor/base64.sql
Legacy MySQL (v 5.1) BASE64 functions
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for base64_data
-- ----------------------------
DROP TABLE IF EXISTS `base64_data`;
CREATE TABLE `base64_data` (
`c` char(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`val` tinyint(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;