- Commons:
git config --global http.sslVerify false
- Don't forget to use proxy!
git config --global http.proxy dm-logv:pass123@mwg:3128
git config --global https.proxy dm-logv:pass123@mwg:3128
- Don't forget to set name and email:
git config user.name "Dmitry Logvinenko"
git config user.email "[email protected]"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Result values table | |
You could change it to permanent table like s/#integers/dbo.Integers/g | |
*/ | |
DROP TABLE IF EXISTS #integers; | |
CREATE TABLE #integers ( | |
i INT NOT NULL PRIMARY KEY | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Slow method | |
Pre-use my integer's table: https://gist.github.com/dm-logv/38eb66f5a2a461cb8f42e14714682daa | |
*/ | |
SELECT TOP 1 i | |
FROM #integers | |
ORDER BY NEWID(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Get date interval | |
Find days of week interval including @date. | |
Args: | |
@date -- Date to find interval | |
@first -- Interval start (day of week number where 1 is Mon, 7 is Sun) | |
@last -- Interval start (day of week number where 1 is Mon, 7 is Sun) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Counts a number of substrings in the given string | |
Args: | |
@string | |
@substring | |
Returns: | |
INT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Split a string by delimiter and return substrings | |
Args: | |
@string NVARCHAR(max), | |
@delimeter NVARCHAR(100) = '' | |
Returns: | |
TABLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Converts SQL Server Agent Time to Time | |
*/ | |
CREATE FUNCTION dbo.fnc_agentTimeToTime ( | |
@agent_date INT | |
) | |
RETURNS TIME(0) | |
AS | |
BEGIN | |
DECLARE @result TIME(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Get table row count | |
See code comments. | |
See http://blogs.msdn.com/b/martijnh/archive/2010/07/15/sql-server-how-to-quickly-retrieve-accurate-row-count-for-table.aspx | |
Args: | |
@table NVARCHAR(1000) , -- Table name (include DB: 'Northwind..tEmployee'). | |
@row_count BIGINT OUTPUT , -- Output result (see example). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM busybox:latest | |
ENV port=8081 | |
RUN \ | |
echo -e 'echo $port\n\nwhile true\ndo\n (echo -e "HTTP/1.1 200 OK\\nContent-Type: text/html\\n\\n<b>Hello World</b><br>Builded at $(date)";) | nc -vv -l -p $port\ndone' > server.sh \ | |
&& chmod +x server.sh \ | |
&& mkdir /var/log | |
EXPOSE 8081:8081 |
OlderNewer