Skip to content

Instantly share code, notes, and snippets.

View hehe24h's full-sized avatar

Ròm Tiến Đạt hehe24h

View GitHub Profile
@toddstowell
toddstowell / youtube-xml-javascript-playlist-parser
Created April 6, 2011 19:14
A simple way to fetch data from youtube api xml feed for a single playlist
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head profile="http://gmpg.org/xfn/11">
<style type="text/css">
/* placeholder inline styles */
body { font-family: arial, verdana; }
@adamjohnson
adamjohnson / publickey-git-error.markdown
Last active July 7, 2025 18:00
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
@edokeh
edokeh / index.js
Last active November 23, 2025 17:00
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@hofmannsven
hofmannsven / README.md
Last active June 6, 2023 18:01
Add WordPress admin menu pages with another Dashicon. (Note: This will require at least WordPress 3.8)
@glueckpress
glueckpress / sample-admin-notice.php
Last active October 30, 2022 15:03
[WordPress] Sample Admin Notices
<?php
defined( 'ABSPATH' ) or die( 'Poop.' );
/**
* Plugin Name: _Sample Admin Notice
* Description: Displays a sample admin notice once for admins. (Requires PHP 5.3+.)
* Version: 0.1
* Author: Caspar Hübinger
* Plugin URI: https://gist.github.com/glueckpress/6befeb937da89025d4d8#file-sample-admin-notice-php
* Author URI: https://profiles.wordpress.org/glueckpress
* License: GNU General Public License v3
@buihuynhhung
buihuynhhung / dat_ten_id_class.txt
Created October 17, 2016 01:26
Một số cách đặt tên id và class
MỘT SỐ CÁCH ĐẶT TÊN ID VÀ CLASS
Cách đặt tên:
_ Tên không được quá dài. <= cực kỳ quan trọng.
_ Hạn chế dịch (Chỉ dịch khi chưa biết đó thuộc khu vực tên nào mà thôi).
_ Thường thì chỉ cần xác định rõ khu vực, ý muốn của designer là ta có thể đặt được tên cho phù hợp.
VD: nhìn vào biết khu vực mà design muốn đưa thông tin giới thiệu thì ta nên đặt các tên sau: introduce, info, information. Nếu giới thiệu về cty thì cần: aboutUs, company, …
_ Việc đặt tên này chẳng những có ý nghĩa cho từng khu vực, mà nó còn giúp cho người khác khi nhìn vào code sẽ dễ dàng hình dung đó là gì.
Common:
#header