Skip to content

Instantly share code, notes, and snippets.

View lepfsd's full-sized avatar
🏠
Working from home

fsd lepfsd

🏠
Working from home
View GitHub Profile
@lepfsd
lepfsd / json_response.php
Created November 8, 2019 20:02
generate json response php
function json_response($message = null, $code = 200)
{
// clear the old headers
header_remove();
// set the actual code
http_response_code($code);
// set the header to make sure cache is forced
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900");
// treat this as json
header('Content-Type: application/json');
@lepfsd
lepfsd / keybase.md
Last active September 16, 2019 23:25

Keybase proof

I hereby claim:

  • I am lepfsd on github.
  • I am lepfsd00 (https://keybase.io/lepfsd00) on keybase.
  • I have a public key ASCch2wYJgx1TUPuUoo-St6T8BKRQSpH5hTx1w3cg66Ovgo

To claim this, I am signing this object:

@lepfsd
lepfsd / chrome_android.txt
Created August 9, 2019 03:03
trucos google chrome android
chrome://flags
chrome duet
scroll anchor serialization
parallel downloading
enable horizontal tab switcher
future v8 vm features
smooth scrolling
@lepfsd
lepfsd / .hyper.js
Last active May 6, 2020 16:14
.hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
{
"workbench.iconTheme": "file-icons",
"workbench.activityBar.visible": false,
"editor.detectIndentation": true,
"editor.renderIndentGuides": false,
"editor.multiCursorModifier": "ctrlCmd",
"workbench.list.multiSelectModifier": "alt",
"workbench.colorTheme": "One Dark Pro",
"editor.fontLigatures": false,
"editor.fontSize": 14,
Hey! Welcome to the JavaScript group. First of all, please read the rules:
@thedevsrules
Want to learn JavaScript and conquer the world? Start here:
Tutorials and Books
- JavaScript For Cats (http://jsforcats.com/) is a dead simply introduction for new programmers.
- MDN JavaScript Guide (https://developer.mozilla.org/docs/Web/JavaScript/Guide%5C) has the most standard and straightforward tutorials. If you need references, MDN is here for you
too.
- You Don’t Know JS (https://github.com/getify/You-Dont-Know-JS%5C) is the best book to learn JavaScript from. It’s free to read on GitHub.
@lepfsd
lepfsd / gist:9d42002e30375d2121b803d8d9d32442
Created September 3, 2017 01:01
cross-env fix package.json
"dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config
@lepfsd
lepfsd / useful google drive links
Created August 11, 2017 05:21
useful google drive links
@lepfsd
lepfsd / php tips
Created August 11, 2017 05:10
20 Tips you need to learn to become a better PHP Programmer
//Use <?php and ?>
<? ... ?> // Incorrect
<?php ... ?> // Correct
<?=$Var?> // Incorrect
<?php echo $Var ?> // Correct
//Separate Configuration Files
include("<span class="skimlinks-unlinked">config.php</span>");
// code goes here ...