Skip to content

Instantly share code, notes, and snippets.

View u-l-y's full-sized avatar

улик u-l-y

  • Spain
View GitHub Profile
<div class="col-xs-12 col-sm-6 col-md-12">
<div id="fb-container">
<div class="fb-page" data-tabs="timeline" data-href="https://www.facebook.com/cloverepublic/" data-height="250" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="false"><blockquote cite="https://www.facebook.com/cloverepublic/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/cloverepublic/">Clove Republic</a></blockquote></div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(window).bind("load resize", function(){
@u-l-y
u-l-y / 4ffd0b928327fe8b8edcadb94bedc2dc.html
Created August 7, 2017 08:21 — forked from pricejn2/4ffd0b928327fe8b8edcadb94bedc2dc.html
responsive ad unit with revive ad server
<div id="revive-responsive-top" style="display: block; text-align: center;">
<script type="text/javascript">
adUnit = document.getElementById("revive-responsive-top");
adWidth = adUnit.offsetWidth;
if ( adWidth >= 728 ) {
/* Leaderboard 728x90 */
adUnit.innerHTML = '<ins data-revive-zoneid="3" data-revive-id="4689b54ec658f530f3250f4124e7f1ea"></ins>';
} else {
@u-l-y
u-l-y / global-variables-are-bad.js
Created August 21, 2017 09:01 — forked from hallettj/global-variables-are-bad.js
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@u-l-y
u-l-y / starting.yaml
Created July 21, 2019 19:58 — forked from gordonbrander/starting.yaml
Starting - creative prompts
# Prompts for beginning new projects
start:
- "#5ps#"
- "#heart#"
- "#disirability_feasibility_viability#"
- "#practical_step#"
- "#build#"
- "#story#"
- "#ooda#"
@u-l-y
u-l-y / hollywood-vs-sw.md
Created July 21, 2019 20:12 — forked from gordonbrander/hollywood-vs-sw.md
Hollywood vs Software
@u-l-y
u-l-y / youtubePlaylistIds.js
Last active April 2, 2020 15:06
Extract Youtube IDs from a Playlist (in console)
const videos = [
...document.querySelectorAll(
'.yt-simple-endpoint.ytd-playlist-video-renderer'
)
].map(
v =>
v
.getAttribute('href')
.split('=')[1]
.split('&')[0]
@u-l-y
u-l-y / getEmailsFromGmail.js
Last active May 13, 2021 12:13
Extract Emails from Gmail current page using the browser console
// Make sure you load the url that you are looking to get the emails from
// right from the beginning, so if you are looking to search something, do
// the search and then refresh to load just the data of the right url
// Example: https://mail.google.com/mail/u/0/#search/job+position
console.log([...document.querySelectorAll('span')]
.filter((el, idx) => el.getAttribute('email') && idx % 2 === 1)
.map(el => el.getAttribute('email')));
@u-l-y
u-l-y / donwloadImgsFromConsole.js
Created December 5, 2021 07:06
Donwload images from a site (filtering by type) using the browser console
const validFormats = ['jpg', 'jpeg', 'png'];
const images = [...document.getElementsByTagName('img')]
.map(img => img.getAttribute('src'))
.filter(img => validFormats.some(format => img.includes(format)));
let i = 0;
setInterval(() => {
if (images.length > i) {
const link = document.createElement('a');
link.id = i;
@u-l-y
u-l-y / RemoveInstagramPopup.js
Last active December 10, 2021 04:12
Remove Instagram popup when not logged in, using browser console
document.querySelector('body > div[role="presentation"]').remove();
document.querySelector('body').removeAttribute('style');