This file contains hidden or 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 { parse } from 'path'; | |
/** | |
* Search for | |
* | |
* import ... from 'mydependency'; | |
* | |
* And replace with a relative import: | |
* | |
* import ... from '.../mydependency'; |
This file contains hidden or 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 { parse } from 'path'; | |
/** | |
* Search it() calls and replace with test() in .spec.js files | |
* | |
* Run with: jscodeshift -t itToTestTransform.js lib | |
*/ | |
module.exports = function (file, api) { | |
const j = api.jscodeshift; |
This file contains hidden or 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
package com.innovatm.database; | |
// ... | |
@Component | |
public class NativeQuery { | |
@Autowired | |
private JpaTransactionManager jpaTransactionManager; | |
This file contains hidden or 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
logging.level.org.hibernate.SQL=debug | |
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=trace | |
logging.level.org.springframework.orm.jpa.JpaTransactionManager=debug |
This file contains hidden or 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
# install dep | |
npm i -g detect-file-encoding-and-language | |
# one file | |
dfeal myfile.txt | |
# file in folder | |
find ./myfolder -maxdepth 1 -type f -printf '%p' -exec dfeal {} \; | |
# recursive |
This file contains hidden or 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
curl -H "Origin: http://localhost:8080" \ | |
-H "Access-Control-Request-Method: POST" \ | |
-H "Access-Control-Request-Headers: X-Requested-With" \ | |
-X OPTIONS --verbose \ | |
http://localhost:8080/my/api | |
# ... | |
# < Access-Control-Allow-Origin: * | |
# < Access-Control-Allow-Methods: POST | |
# < Access-Control-Allow-Headers: X-Requested-With |
OlderNewer