Skip to content

Instantly share code, notes, and snippets.

💭
On time

Bundit Nuntates silkyland

💭
On time
Block or report user

Report or block silkyland

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@silkyland
silkyland / CertStorageError.MD
Last active Sep 9, 2019
[Solved] CertStorageError: expected /etc/letsencrypt/live/example.com/cert.pem to be a symlink
View CertStorageError.MD

[Solved] CertStorageError: expected /etc/letsencrypt/live/example.com/cert.pem to be a symlink

  rm -rf /etc/letsencrypt/live/{yourdomain.com}
  rm -rf /etc/archive/{yourdomain.com}
  rm -rf /etc/renewal/{yourdomain.com}

and

View todolistmockup.js
import React, { Component } from "react";
class App extends Component {
render() {
return (
<div
style={{
borderColor: "#e12c6a",
borderWidth: 2,
borderStyle: "solid",
@silkyland
silkyland / How to resolve module error
Last active Dec 8, 2017
Error: bundling failed: UnableToResolveError: Unable to resolve module ....
View How to resolve module error
error: bundling failed: UnableToResolveError: Unable to resolve module `inspector` from `/Users/.....`: Module does not exist in the module map
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
@silkyland
silkyland / fixnotify.txt
Last active Oct 11, 2017
A problem occurred configuring project ':app', Failed to notify project evaluation listener, javax/xml/bind/annotation/XmlSchema
View fixnotify.txt
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> javax/xml/bind/annotation/XmlSchema
--
If you got error like above that mean "You are using JDK higher than graddle need eg. You install JDK 9 it should be 8"
How to fix:
1) Remove JDK version 9 by
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
@silkyland
silkyland / strToThaiSlug.js
Last active Jul 17, 2019
Convert string to slug in Thai language for SEO Friendly in JavaScript
View strToThaiSlug.js
var strToThaiSlug = function (str){
return str.replace(/\s+/g, '-') // Replace spaces with -
.replace('%', 'เปอร์เซนต์') // Translate some charactor
.replace(/[^\u0E00-\u0E7F\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, '');
}
var str = "รักษา ทดสอบ 123 % 19dsadf -0wer .. 'ดินสอ'^^) + 9 +5 -"
console.log(strToThaiSlug(str))
You can’t perform that action at this time.