Skip to content

Instantly share code, notes, and snippets.

@dipenparmar12
dipenparmar12 / 1. Install MySQL on Linux.md
Last active April 24, 2024 10:33
How To Install MySQL on Linux

How To Install MySQL on Linux

Video Tutorial

Update the system packages to the latest versions:

@burnpiro
burnpiro / functionOptimisation.md
Created August 1, 2019 13:14
Spread VS JSON.parse performance in function optimisation

Spread vs JSON.parse speed when calling simple function

const N = 100000;

function test(obj) {
  var result = obj.a + obj.b;
  return result;
}
function test2(obj) {
 var result = obj.a + obj.b;
@wesruv
wesruv / .lando.yml
Last active February 17, 2020 20:01
Lando config for a Drupal 7 site with Compass Sass
name: mydrupalprojectwithcompass
recipe: drupal7
config:
webroot: docroot
php: '5.6'
database: mysql:5.7
xdebug: true
events:
post-db-import:
- appserver: cd $LANDO_WEBROOT/sites/default && drush rr
@Ryanb58
Ryanb58 / install.md
Last active June 25, 2024 19:59
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@daviddarnes
daviddarnes / pluralise.twig
Created October 31, 2017 13:11
Pluralising with Twig
{% spaceless %}
{% if integer > 1 %}
{{ plural }}
{% else %}
{{ singular }}
{% endif %}
{% endspaceless %}
@cimmanon
cimmanon / psql.md
Created May 2, 2017 17:22
PostgreSQL cheat sheet for MySQL users

I use PostgreSQL via the psql client. If you use a different client (eg. pgAdmin, etc.), I don't know how much will translate over.

One nice difference between psql and mysql (cli) is that if you press CTRL+C, it won't exit the client.

User administration

Login as superuser (via shell)

psql -U postgres
@ArnaudLigny
ArnaudLigny / PhpArrayToYaml.php
Last active May 24, 2023 10:52
Convert PHP array to YAML
#!/usr/local/bin/php
<?php
if (php_sapi_name() !== 'cli') {
return;
}
date_default_timezone_set('Europe/Paris');
require_once 'vendor/autoload.php';
use Symfony\Component\Yaml\Yaml;
try {
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@anilnairxyz
anilnairxyz / .about+license.md
Last active April 14, 2024 13:41
Candlestick Chart

A zoomable candlestick chart.

Copyright © 2017-20, Sandhya Pillai - MIT License

@soifou
soifou / iTerm2.md
Last active July 4, 2024 08:25
iTerm2 Shortcuts

iTerm2 Shortcuts

Tab navigation

  • open new tab: Cmd + t
  • next tab: Cmd + Shift + ]
  • previous tab: Cmd + Shift + [

Pane navigation