Skip to content

Instantly share code, notes, and snippets.

View diego-mi's full-sized avatar

Diego Mi Campos diego-mi

  • Jaboticabal-SP, Brasil
View GitHub Profile
@madkoding
madkoding / install-docker-deepin.sh
Last active November 16, 2024 13:57
Install Docker-CE script for Deepin Linux
#!/bin/bash
echo "Starting Docker installation on Deepin Linux..."
# Define a mapping from Deepin version to Debian version
map_deepin_to_debian() {
if [ "$1" -lt 20 ]; then
echo "stretch"
elif [ "$1" -ge 20 ]; then
echo "buster"
@pbalduino
pbalduino / highperfjs.txt
Created June 22, 2017 06:59
High Performance JavaScript reference
https://www.slideshare.net/nzakas/high-performance-javascript-yuiconf-2010
https://www.slideshare.net/nzakas/writing-efficient-javascript/24-Scope_Chain_Augmentation_The_with
https://www.slideshare.net/caelumdev/otimizaes-de-performance-web-desafios-do-mundo-mobile
https://www.slideshare.net/caelumdev/performance-web-alm-do-carregamento
https://www.w3schools.com/js/js_performance.asp
@a3dho3yn
a3dho3yn / mongodb_c#_cheatsheet.md
Last active June 13, 2024 14:12
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@ClementParis016
ClementParis016 / script.js
Last active July 10, 2024 14:09
TinyMCE characters counter plugin
tinymce.init({
plugins: 'charactercount',
elementpath: false
});
@santoshachari
santoshachari / Laravel PHP7 LEMP AWS.md
Last active October 3, 2024 21:26
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@leocomelli
leocomelli / git.md
Last active November 19, 2024 23:39
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@zenorocha
zenorocha / multiple-3rd-party-widgets.js
Last active October 4, 2024 14:04
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@jswebschmiede
jswebschmiede / snippet.js
Created September 6, 2012 22:31 — forked from necolas/snippet.js
Optimised async loading of cross-domain scripts
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
* Tip: http://pivotallabs.com/users/jdean/blog/articles/1400-working-with-asynchronously-loaded-javascript
*/
(function(doc, script) {
var js,