my resharper snippets
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
<div id="video-container"></div> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var vimeoId = 98357626; | |
// get description of video from vimeo | |
$.getJSON("http://vimeo.com/api/v2/video/" + vimeoId + ".json", function (videos) { | |
$("#video-descr").html(videos[0].description); | |
}); |
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
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Web; | |
namespace api_v1_csharp.Models.academics | |
{ | |
public class Program | |
{ |
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
<rule name="redirect-aspx" enabled="true" stopProcessing="true"> | |
<match url="(.*).aspx$" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="http://library.morrisville.edu/{R:1}" appendQueryString="true" /> | |
</rule> |
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
<snippet> | |
<content><![CDATA[ | |
<%@ Import Namespace="${1:}" %> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>imp</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.asp</scope> | |
</snippet> |
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
<snippet> | |
<content><![CDATA[ | |
<!-- #include file = "${1:}" --> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>include</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.asp</scope> | |
</snippet> |
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
""" | |
hhhhh aaaaa => h5 5a5 | |
""" | |
def compress_sentence(sentence): | |
prev_letter = sentence[0] | |
frequency = 1 | |
output = '' | |
for letter in sentence[1:]: |
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ /mysite/application.cgi/$1 [L] |
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
namespace api_v1_csharp.Models.ldap | |
{ | |
using System; | |
using System.DirectoryServices; | |
using System.DirectoryServices.ActiveDirectory; | |
using System.DirectoryServices.AccountManagement; | |
using System.Collections.Generic; | |
public class UsersRepository : IUsersRepository | |
{ |
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
class XmasTest(unittest.TestCase): | |
@mock.patch('xmas.date') | |
def test_days_til_xmas_when_xmas(self, mock_date): | |
mock_date.today.return_value = date(2020, 12, 25) | |
mock_date.side_effect = lambda *args, **kw: date(*args, **kw) | |
days = days_til_xmas() | |
self.assertEqual(days, 0) |
OlderNewer