Skip to content

Instantly share code, notes, and snippets.

View hacheraw's full-sized avatar
🙈
life is soup i am fork

Hache_raw hacheraw

🙈
life is soup i am fork
View GitHub Profile
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@codeguy
codeguy / slugify.js
Created September 24, 2013 13:19
Create slug from string in Javascript
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}
@hkdobrev
hkdobrev / class-order.php
Last active May 15, 2024 16:56
PHP convention for the order in a class.
<?php namespace Vendor\Library;
use Another\Vendor\Library\ClassName;
abstract class ClassName extends AnotherClass implements Countable, Serializable
{
const CONSTANTS = 'top';
use someTrait, anotherTrait {
anotherTrait::traitMethod insteadof someTrait;
@geilt
geilt / gist:817ff32b20414ddd5a16
Created August 27, 2014 20:10
jQuery $.load into Variable.
var url = 'http://www.google.com';
var load = $('<div>');
var content = '';
load.load(url, function(result){
content = load.html();
});
@drkarl
drkarl / gist:739a864b3275e901d317
Last active October 17, 2023 10:43
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@mattes
mattes / og.txt
Last active May 7, 2022 01:53
Open Graph debugger
http://ogp.me/
https://moz.com/blog/meta-data-templates-123
https://search.google.com/structured-data/testing-tool
https://developers.facebook.com/tools/debug/og/object - https://developers.facebook.com/docs/reference/opengraph
https://cards-dev.twitter.com/validator - https://dev.twitter.com/cards/types
https://developers.pinterest.com/tools/url-debugger/ - https://developers.pinterest.com/docs/rich-pins/overview/
https://developer.linkedin.com/docs/share-on-linkedin
@jennyknuth
jennyknuth / README.md
Last active March 23, 2024 16:33
140 html color names as an array of json objects—enjoy!

HTML Colors

All 140 HTML colors as JSON objects with fields:

  • name
  • hex
  • rgb
  • families
@gemmadlou
gemmadlou / 01-introduction.md
Last active June 29, 2024 15:06
WordPress Composer Starter (Steps)

Develop WordPress as a Modern PHP Project with Composer


WordPress is popular because it's easy to setup without much technical know-how. However, to build a more robust PHP project with command line deployments, updates and ongoing maintenance, working with WordPress out-of-the-box raises specific challenges:


  • How can we make our WordPress projects portable between developers?
@bradtraversy
bradtraversy / docker-help.md
Last active July 1, 2024 01:13
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@mattiaa95
mattiaa95 / PHPPOSTReplicationNoSSL
Created June 24, 2020 18:46
PHP Post replication to other domain with disable SSL Verification
<?php
//API URL
$url = '';
$ch = curl_init($url);
$jsonDataEncoded = file_get_contents('php://input');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);