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 class App { | |
public static void main(String[] args) throws SQLException { | |
final String username = "jordan"; | |
final String password = "test"; | |
final String db = "test"; | |
final String query = "SELECT SUM(UpVotes), COUNT(Id) FROM users"; | |
DriverManager.registerDriver(new Driver()); | |
try (final Connection connection = DriverManager.getConnection("jdbc:mysql://192.168.100.150/test", username, password)) { |
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
@mixin reset-stupid-background($selectors) { | |
@each $sel in $selectors { | |
#{$sel} { | |
background: none !important; | |
} | |
} | |
} | |
@include reset-stupid-background( | |
"ul.x-tab-strip-top" |
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
{ | |
extend: function (target) { | |
var clone = _.clone(this); | |
_.extend(clone, target); | |
return clone; | |
}, | |
beforeMixin: function (target) {}, | |
afterMixin: function (target) {}, |
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
@Post("/account/{accountId}/changeEmail") | |
public class ChangeEmailRequest { | |
private int accountId; | |
private String newEmailAddress; | |
} | |
// Then the Handler |
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
private object InterceptGet(string url, IInvocation invocation) | |
{ | |
var retVal = invocation.Method.ReturnType; | |
if (retVal.IsGenericType && retVal.Name == typeof (IObservable<>).Name) | |
{ | |
retVal = retVal.GenericTypeArguments[0]; | |
} | |
var retType = _subjectType.MakeGenericType(retVal); |
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
[ServiceClient("/path/to/endpoint", BaseType = typeof(BaseServiceClient<HelloWorldDto, int>))] | |
public interface IHelloWorldClient { | |
[HttpGet] | |
IObservable<HelloWorldDto> GetBy(int key); | |
[HttpPost] | |
IObservable<HelloWorldDto> Create(HelloWorldDto entity); | |
} |
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
// Service Client doesn't make the call until we attempt to enumerate the results (.ToList()) | |
var serviceClient = new UsersServiceClient(); | |
List<User> disabledUsers = serviceClient.Get().Where(user => user.IsDisabled).ToList(); | |
// Or a more complex example | |
var serviceClient = new IssuesServiceClient(); | |
var query = serviceClient.Get() | |
// At this point the query hasn't run |
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
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <disassembler@dasm.cz> | |
# Version: 1.7, 2016-08-15 | |
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
# THIS IS A PERSONALIZED VERSION | |
# This script leaves more MS defaults on, including MS security features. | |
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 |