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
<?php | |
function console_log( $data ){ | |
echo '<script>'; | |
echo 'console.log('. json_encode( $data ) .')'; | |
echo '</script>'; | |
} | |
if($result_insert->execute()!== false){ | |
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
Caution: this will remove the local changes that you did in the repo, it's usefull to update spacemacs and flutter | |
git stash save --keep-index | |
git stash drop |
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
https://prismic.io/ | |
https://strapi.io/ | |
www.netlify.com | |
graphcms.com | |
opensource | |
getdirectus.com |
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
#!/bin/bash | |
#/home/me/bin/toggle-keyboard | |
kb_name='AT Translated Set 2 keyboard' | |
if xinput list "$kb_name" | grep -i --quiet disable; then | |
xinput enable "$kb_name" | |
else | |
xinput disable "$kb_name" | |
fi |
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
this works for me, not neccesary for you...but maybe could help | |
1) start with arch/manjaro live cd | |
2) update your packages with sudo pacman -Syy | |
3) install pacman -S arch-install-scripts | |
4) mount your partition with mount /dev/sda7 /mnt (in my case is sda7) | |
5) run arch-chroot /mnt/arch | |
6) run pacman -S linux | |
restart your machine!!!...and hopefully this will work |
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
inxi -Fxxxz |
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
const ROOT_SOCKET = `wss://${URL}/socket`; | |
let socket = new Socket(ROOT_SOCKET); | |
socket.connect() | |
let chan = socket.channel("connect:" + guid()); | |
chan.join(); | |
and then I could create a mutation for load the callbacks and call this from my main component | |
someMutation(state) { |
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
For other users who just want to download a file/folder from github, simply use: | |
svn export <repo>/trunk/<folder> | |
e.g. | |
svn export https://github.com/lodash/lodash.com/trunk/docs | |
(yes, that's svn here. apparently in 2016 you still need svn to simply download some github files) | |
Courtesy: Download a single folder or directory from a GitHub repo |
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 promisify(func) { | |
return (...args) => | |
new Promise((resolve, reject) => { | |
const callback = (err, data) => err ? reject(err) : resolve(data) | |
func.apply(this, [...args, callback]) | |
}) | |
} | |
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
//con callbacks debes pasar el callback, cuyo argumento se va a resolver en un futuro...en el siguiente ejemplo el valor de database | |
//se resolverá en el futuro, luego book y luego user | |
connectDatabase(function(database){ | |
findAllBooks(database,function(book){ | |
getCurrentUser(database,function(user){ | |
return pickTopRecommendation(books, user); | |
}) | |
}) | |
}) |