Skip to content

Instantly share code, notes, and snippets.

Avatar

Uly u-l-y

  • Spain
View GitHub Profile
@u-l-y
u-l-y / youtubePlaylistIds.js
Last active Apr 2, 2020
Extract Youtube IDs from a Playlist (in console)
View youtubePlaylistIds.js
const videos = [
...document.querySelectorAll(
'.yt-simple-endpoint.ytd-playlist-video-renderer'
)
].map(
v =>
v
.getAttribute('href')
.split('=')[1]
.split('&')[0]
View hollywood-vs-sw.md
@u-l-y
u-l-y / starting.yaml
Created Jul 21, 2019 — forked from gordonbrander/starting.yaml
Starting - creative prompts
View starting.yaml
# Prompts for beginning new projects
start:
- "#5ps#"
- "#heart#"
- "#disirability_feasibility_viability#"
- "#practical_step#"
- "#build#"
- "#story#"
- "#ooda#"
@u-l-y
u-l-y / save-all-albums-from-flickr-account.php
Last active Apr 20, 2019
Save all Flickrs albums and its images into a text file
View save-all-albums-from-flickr-account.php
<?php
class Flickr
{
protected static $_rest_uri = 'https://api.flickr.com/services/rest/';
protected static $_params = array();
public static $api_key;
public static function call($method, array $params = array())
{
if (self::$api_key === null and !isset($params['api_key'])) {
@u-l-y
u-l-y / DebugAndroidWebAppRemote.md
Last active Feb 21, 2018 — forked from KDawg/DebugAndoirdWebAppRemote.md
Debug Android WebApp Over Remote Chrome from OSX
View DebugAndroidWebAppRemote.md

#Remote debugging USB-connected Android via Chrome

##Phone Setup

  • Requires a handset with modern Android (ala 4.X, etc)
  • settings => developer options => usb debug enable
  • phone => chrome => settings => developer tools => usb debug enable

##Desktop Setup - One Time Only

View gist:c2367f3e008e85da57b1e324082107e6
/**
* Insert an attachment from an URL address.
*
* @param String $url
* @param Int $post_id
* @param Array $meta_data
* @return Int Attachment ID
*/
function crb_insert_attachment_from_url($url, $post_id = null) {
@u-l-y
u-l-y / global-variables-are-bad.js
Created Aug 21, 2017 — forked from hallettj/global-variables-are-bad.js
How and why to avoid global variables in JavaScript
View global-variables-are-bad.js
// 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() {
View 4ffd0b928327fe8b8edcadb94bedc2dc.html
<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 {
View Responsive Facebook Page Plugin
<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(){
You can’t perform that action at this time.