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
# Set request method: | |
curl -X DELETE http://localhost:3000/books/1 | |
# Set request parameters: | |
curl -d "book[title]=Test" -d "book[copyright]=1998" http://localhost:3000/books | |
# Set header: | |
curl -H "Accept: text/xml" http://localhost:3000/books/sections/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
ssh-keygen -v -t rsa -f ~/.ssh/my-key-name -C my-key-comment |
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
bundle exec rails c production |
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
Rails.application.config |
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
SELECT column, COUNT(*) count FROM table GROUP BY column HAVING count > 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
create table tmp like mytable; | |
alter table tmp engine=MyISAM; | |
insert into tmp select * from mytable; | |
alter ignore table tmp add unique index(col1,col2); | |
alter table tmp engine=InnoDB; |
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
let instance = null; | |
class MySingleton { | |
constructor() { | |
if(!instance){ | |
instance = this; | |
} | |
return instance; | |
} |
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
import {ok} from 'assert'; | |
describe('foo()', () => { | |
it('should pass', () => { | |
ok(true); | |
}); | |
}); |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' ID='_d43649c1-8d01-4629-b3e3-ed452806463c' entityID='https://api.staging.workpath.com/v1/saml/metadata/ad-test'> | |
<md:SPSSODescriptor protocolSupportEnumeration='urn:oasis:names:tc:SAML:2.0:protocol' AuthnRequestsSigned='false' WantAssertionsSigned='false'> | |
<md:SingleLogoutService Binding='urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' Location='https://api.staging.workpath.com/v1/saml/logout/ad-test' ResponseLocation='https://api.staging.workpath.com/v1/saml/logout/ad-test'/> | |
<md:NameIDFormat> | |
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress | |
</md:NameIDFormat> | |
<md:AssertionConsumerService Binding='urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST' Location='https://api.staging.workpath.com/v1/saml/assert/ad-test' isDefault='true' index='0'/> | |
</md:SPSSODescriptor> | |
</md:EntityDescriptor> |
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
function isHubspotUrl(url) { | |
var hubspotUrls = [ | |
'https://local.hubspot.com', | |
'https://app.hubspotqa.com', | |
'https://app.hubspot.com', | |
'https://meetings.hubspot.com' | |
]; | |
return hubspotUrls.indexOf(url) > -1 | |
} |
OlderNewer