Steps to deploy Node.js to VPS using PM2 and Github Actions
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 { makeOperation } from '@urql/svelte' | |
import { authExchange } from '@urql/exchange-auth' | |
import { Auth } from 'aws-amplify' | |
import produce from 'immer' | |
import { set } from 'lodash' | |
const amplifyAuthExchange = authExchange({ | |
addAuthToOperation: ({ authState, operation }) => { | |
if (!authState?.token) { | |
return operation |
Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});
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
/* Conditional */ | |
SELECT product_id, language_code, name, custom_name, description, short_description FROM product_translations | |
WHERE product_id=16741 AND | |
language_code = SELECT IF ((SELECT COUNT(*) FROM product_translations WHERE product_id=16741), 'es', 'en_US'); | |
/*With Join*/ | |
ELECT DISTINCT pro.product_id, pcr.category_id,pro.product_sku, |
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
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
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
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
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 an account, create an app | |
# @see https://apps.twitter.com/ | |
# retrieve the access tokens | |
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token | |
# create the file ~/twitter_api | |
nano ~/twitter_api | |
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.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
//Usage | |
import React from 'react'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import Route from './AuthRoute'; | |
import Login from './Login'; | |
import Private from './Private'; | |
export default () => | |
<Router> |
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.Content.Headers.Add("Content-Disposition", "attachment; filename=" + FileName); | |
Result.Content.Headers.Add("Access-Control-Expose-Headers", "filename"); | |
Result.Content.Headers.Add("filename", FileName); |
NewerOlder