Skip to content

Instantly share code, notes, and snippets.

View Nemra1's full-sized avatar

Ahmed El Sheikh Nemra1

View GitHub Profile
@mi-ca
mi-ca / bandcamp.embed.php
Last active November 12, 2021 03:36
Bandcamp Embed - YouTube Embed & SoundCloud Embed : PHP Classes to auto embed and grab links from Bandcamp, Youtube and Soundcloud
<?php
/**
* Analyse a string , grab Bandcamp links and replace them by embed player
* You may change the html code of the player in buildEmbed method
*
* @author Michael CAILLET <a href="https://mi-ca.ch">mi-ca.ch</a>
* @version 1.0
* @uses $bc=new BandCampEmbed($string);
* echo $bc->getEmbededText();
* // OR
@DavidWells
DavidWells / clear-browser-cache.js
Last active February 24, 2021 09:55
Clear Browser cache. Run in your browsers javascript console
//Cache Buster
(function (){
  var rep = /.*\?.*/,
      links = document.getElementsByTagName('link'),
      scripts = document.getElementsByTagName('script'),
      process_scripts = false;
  for (var i=0;i<links.length;i++){
    var link = links[i],
        href = link.href;
    if(rep.test(href)){
@taiar
taiar / macaddress.php
Last active May 29, 2021 14:35
Get MAC address from Windows host server in PHP
<?php
/*
* Getting MAC Address using PHP
* Md. Nazmul Basher
*/
ob_start(); // Turn on output buffering
system('ipconfig /all'); //Execute external program to display output
$mycom=ob_get_contents(); // Capture the output into a variable
ob_clean(); // Clean (erase) the output buffer
@anandgeorge
anandgeorge / app.js
Created May 27, 2012 16:15
Socket.io example with jquery and dom manipulation
var io = require('socket.io').listen(8000),
nicknames = {};
io.sockets.on('connection', function (socket) {
socket.on('user message', function (msg) {
socket.broadcast.emit('user message', socket.nickname, msg);
});
socket.on('nickname', function (nick, fn) {
if (nicknames[nick]) {
@jakebresnehan
jakebresnehan / Simple-HTML5-Local-Storage.js
Created March 6, 2012 06:02
Simple HTML5 Local Storage example to hide a element
Need to include Modernizer (http://www.modernizr.com/) and jQuery (http://jquery.com/)
$(document).ready(function($){
if (Modernizr.localstorage) {
$('#hide-button').click(function(e){
localStorage.setItem('subscribed',true);
$('#sign-up-form,#hide-button').hide();
$('#hide-button').hide();