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
var buttons = $(".js-follow-btn .follow-text :visible"), | |
interval = setInterval(function(){ | |
var btn = $(buttons.splice(0, 1)); | |
console.log("Clicking:", btn); | |
btn.click(); | |
if (buttons.length === 0) { | |
clearInterval(interval); | |
} | |
}, 100); |
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.Linq; | |
using NUnit.Framework; | |
namespace Nest.AutoId | |
{ | |
[ElasticType(Name = "data", IdProperty = "Id")] | |
public class DataForGet : DataForIndex | |
{ | |
public string Id { get; set; } |
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 Array | |
def skip_first?(accumulator) | |
return 1 if accumulator.nil? | |
return 0 unless accumulator.nil? | |
end | |
def my_inject(accumulator = nil) | |
start = skip_first? accumulator | |
accumulator ||= self.first |
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
describe('MyController', function () { | |
var controller, scope, myService, q; | |
beforeEach(function () { module('MyApp'); }); | |
beforeEach(inject(function ($controller, $rootScope, $q) { | |
controller = $controller; | |
scope = $rootScope.$new(); | |
myService = jasmine.createSpyObj('myService', ['getSomething']); | |
q = $q; |
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
var app = angular.module('MyApp', []); | |
app.controller('MyController', function($scope, myService) { | |
myService.getSomething() | |
.then(function(response) { | |
$scope.viewModel = response; | |
}); | |
}); |
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
Restore deleted file from git | |
git log --diff-filter=D --summary | |
git checkout xxxx~1 filename | |
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
var settings = A.Fake<IConnectionSettings>(); | |
var connection = A.Fake<IConnection>(); | |
A.CallTo(() => settings.DefaultIndex).Returns("nest_test_data"); | |
var value = new ConnectionStatus(File.ReadAllText(@"InversionOfControl.json")); | |
A.CallTo(() => | |
connection.PostSync( | |
A<string>.That.Contains("nest_test_data/elasticsearchprojects/_search"), |
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
@echo on | |
set DbName="db_name" | |
for %%i in (*.sql) do sqlcmd -E -S localhost -d %DbName% -i %%i |
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
server_names_hash_bucket_size 256; | |
server { | |
listen 80; ## listen for ipv4 | |
server_name _; | |
access_log /home/dev/www/logs/localhost.access.log; | |
location / { | |
root /home/dev/www/current; |
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
public abstract class SevenDigitalAppHost : AppHostBase | |
{ | |
protected SevenDigitalAppHost(string serviceName, params Assembly[] assembliesWithServices) | |
: base(serviceName, assembliesWithServices) | |
{ | |
JsConfig.EmitCamelCaseNames = true; | |
JsConfig.DateHandler = JsonDateHandler.ISO8601; | |
Plugins.RemoveAll(x => x is AuthFeature); | |
Plugins.RemoveAll(x => x is SessionFeature); |
OlderNewer