public marks

PUBLIC MARKS from decembre with tag code

This year

GREASEMONKEY (v.4 - webextention) - FIR 57 - Greasespot: Greasemonkey 4 For Script Authors

What? The Greasespot Wiki will be updated to explain Greasemonkey 4 in detail. Until then, here's a quick summary. First, there is only an embedded editor. Browser Extensions have no access to the file system, so you can no longer author user scripts in your familiar text editor. There is only one object provided to user scripts now, named GM. It has several properties. One of them is info – the equivalent of the old GM_info. There are also several methods of this object: getResourceUrl, deleteValue/getValue/listValues/setValue, xmlHttpRequest. To use these methods you still need @grant, and use the new name, e.g.: // @grant GM.setValue The new form has a dot, where the old form has an underscore. You may specify both @grants, if you'd like to be compatible with Greasemonkey 4 and other user script engines at the same time. As of today, there is no support for: GM_log (use console.log), GM_addStyle, GM_registerMenuCommand, nor GM_getResourceText.

fir 6 jquery 6 Getting Started | Select2 - The jQuery replacement for select boxes

The jQuery replacement for select boxes Forums GitHub IRC Chat Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.

USERSTYLES - Greasemonkey - Forum request 2006 - GreaseMonkey List - User scripts on userstyles.org

(via)
I'm the administrator of userstyles.org. I want to start offering my styles to Greasemonkey (and similar) users. For applicable styles on userstyles.org, just plunk "/style.user.js" at the end of the URL. (For example, http://userstyles.org/style/show/242/style.user.js ). Not all styles on the site can be converted into user scripts. For example, those affecting chrome wouldn't work. Those styles will return a 404 if you try to open their styles. I'd like some feedback on the format I'm using. Is the code the best it can be, are there problems with meta-data, etc. Thanks.

FIR - DEV - Éxaminer et modifier le code HTML - Outils de développement | MDN

Recherche: À partir de Firefox 45, la boite de recherche de l'Inspecteur trouve les correspondances dans tout le markup du document ouvert, ainsi que dans toutes les frames. Pour commencer une recherche, il suffit de cliquer sur la boîte de recherche pour l'agrandir ou bien d'utiliser les raccourcis clavier Ctrl + F , ou Cmd + F sous Mac. Lors de la saisie, une pop-up d'autocomplétion affiche toutes les classes ou ID qui correspondent à la recherche en cours :

CSS + STYLUS - Stylus et les préprocesseurs CSS (en guise d’introduction) · Les intégristes

(via)
Première question : qu’est-ce qu’un préprocesseur ? Un préprocesseur est un programme qui procède à des transformations sur un code source, avant l’étape de traduction proprement dite (compilation ou interprétation). source Wikipedia. Dans le cas d’un préprocesseur CSS la syntaxe simplifiée ou enrichie en entrée est analysée et compilée en un langage que nous connaissons tous et que nous utilisons au quotidien : CSS.

CSS - DESIG ONLINE TOOL - Responsive web design tool, CMS, and hosting platform | Webflow

(via)
Webflow gives designers and developers the power to design, build, and launch responsive websites visually, while writing clean, semantic code for you.

IMAGE TAG - CSS - How to Apply a CSS Class to an Inserted Image | Chron.com

(via)
How to Apply a CSS Class to an Inserted Image3. Add 'class="myimage"' within the img tag; it doesn't need to be in a specific location, such as before "title" or "alt," to function. For instance, if your code is (img src="myhouse.jpg" alt="Photo of my house")," it should become: (img src="myhouse.jpg" alt="Photo of my house" class="myimage")

BIB -- L'Awesome Box ou comment hacker le système RFID d'une bibliothèque - - 2017

un chouette dispositif passerelle de médiation numérique des savoirs. L’Awesome Box est un dispositif tellement simple qu’on se demande pourquoi personne n’y avait pensé !C’est donc une boite de retour qui est destinée aux documents que les usagers ont trouvé awesome (formidaaaaable). Une fois déposés dans cette boite, le retour est effectué et les documents sont tagués avec la mention awesome. La liste des titres est alors publiée automatiquement sur une page web et la liste est également diffusée sur twitter. C’est tout bête et c’est même pas récent puisque le projet date de 2011. Le code est accessible on peut facilement imaginer de modifier le dispositif pour proposer plusieurs boites : ce que les gens ont détesté, adoré, ce qu’ils recommanderaient à leur mère, leur frère, etc. Une fois rendus, j’imagine que l’idée est de le remettre en circulation le plus vite possible…

JSON - What is JSON? An Introduction and Guide for Beginners

in this JSON tutorial and guide, I’m attempting to provide a fairly comprehensive discussion of JSON, its history, and its usefulness. I’ll close with a list of some practical JSON tools that might come in handy in future projects. JSON Defined JSON stands for JavaScript Object Notation and it’s a data format. That is, it’s a way to hold bits of information, similar to a database. Although JSON originated outside the ECMAScript specification, it is now closely related to JavaScript with the spec now including a JSON object and many developers incorporating it as a quasi-subset of the language.

jQUERY - JAVASCRIPT - jQuery udraggable Plugin

jquery.udraggable.js This plugin provides an API similar to jQueryUI's draggable but with support for unified mouse and touch events. It builds on Michael S. Mikowski's jquery.event.ue unified event plugin.

JAVASRIPT - JavaScript Style Guide

JavaScript Coding Conventions Coding conventions are style guidelines for programming. They typically cover: Naming and declaration rules for variables and functions. Rules for the use of white space, indentation, and comments. Programming practices and principles Coding conventions secure quality: Improves code readability Make code maintenance easier

CSS - CODE EXAMPLE - "Progress bar horizontal" qui varie suivant le scroll

In AlsaCreation : CODE EXAMPLE -" Progress bar horizonta"l qui varie suivant le scroll body { -moz-box-direction: normal; -moz-box-orient: vertical; background: #f3f3f3 none repeat scroll 0 0; color: #000; display: flex; flex-direction: column; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; font-size: 1.6rem; min-height: 100vh; }

CSS - Conserver le ratio 16/9 des images fullscreen et vidéos - Alsacreations

Le but est ici de faire en sorte que l'image de fond que l'on aura placée en CSS conserve son ratio de 16/9 et prenne toute la taille du navigateur, quelle que soit la taille de ce dernier (aka fullscreen). Pratique quand on fait du responsive. Voici le code utilisé : .ratio { background: url("monimage.jpg") no-repeat; background-size: cover; width: 100vw; height: 56.25vw; } Concrètement ce que l'on fait : on donne à l'image la largeur du navigateur grâce à l'unite vw (viewport-width) on lui donne la hauteur à laquelle on a appliqué un ratio 16:9 calculé en faisant 100 * 9 / 16 de la largeur du navigateur

CSS - COLOR - Keeping CSS short with currentColor — Osvaldas Valutis

it helps to keep CSS code shorter and smarter. Before diving into practical usage examples, here is a short theory course. This is how MDN describes currentColor: The currentColor keyword represents the calculated value of the element’s color property. It allows to make the color properties inherited by properties or child's element properties that do not inherit it by default.

CSS - the new code - FullScreen HTML5 Video In Pure CSS

by 1 other
To make the video fullscreen: video#bgvid { position: fixed; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -100; -ms-transform: translateX(-50%) translateY(-50%); -moz-transform: translateX(-50%) translateY(-50%); -webkit-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); background: url(polina.jpg) no-repeat; background-size: cover; } Conclusion: “Background” video can be a very powerful feature on a site, but with great power comes great responsibility: please use such features judiciously.

CSS - ONLINE TOOL - How to Center in CSS

by 3 others
Centering in CSS is a pain in the ass. There seems to be a gazillion ways to do it, depending on a variety of factors. This consolidates them and gives you the code you need for each situation. Select the type of content you want to center in a parent div and the size of the parent.

2016

RSS - TOOL - Web RSS - RSS Widget - RSS to HTML - Display RSS for Free with Web RSS

Create RSS Feeds for your Website or Blog _ Create your own RSS feeds and track how they do by day, week and month. Ping your feed out to the major ping servers and publish your feed on your website or blog. - Create RSS Feeds without any programing skills - Update your feed without updating the code just login and add more items. - Make your own RSS feeds for News, Podcasts and More! - We host your RSS feed for free! - Track your feeds hits by day, week or month - Get cut and paste code for your feed to place on your site - Ping your feed to the major ping servers for free - Validate your Feed - Edit your feeds at any time and have the update Instantly display on your website.

2015

UserScript: Quick link to Flickr Url and HTML code for images. | Femgeek.co.uk

(via)
This is a very basic user script that puts the url of the image you want in the image thumbnail as your browsing the site, it also adds a textarea to enable you to copy the html straight into your blog post without clicking through to the image

VIRUS - ALERTE (may 2015) - Infostealer.Rombertik - Symantec

The Trojan may arrive on the computer through spam emails. When the Trojan is executed, it creates the following files: %UserProfile%Application Data[RANDOM CHARACTERS][RANDOM CHARACTERS].exe %UserProfile%Application Data[RANDOM CHARACTERS][RANDOM CHARACTERS].bat The Trojan then creates the following file so that it runs every time Windows starts: %SystemDrive%Documents and SettingsAll UsersStart MenuProgramsStartup[RANDOM CHARACTERS].vbs Next, the Trojan connects to the following remote location: www.centozos.org.in/don1/gate.php The Trojan may then perform the following actions: Overwrite the Master Boot Record Encrypt files that don't include the .dll, .exe, .vxd, and .drv file extensions Inject code into web browsers in order to steal sensitive information Disable the SPDY protocol on web browsers to make them less secure

FLICKT - mars 2015 - Introducing the New! Shiny ! Photolist framework - code.flickr.com

(via)
Some photolist pages on Flickr use infinite scrolling, and some display results one page at a time. Regardless of how a page shows its photos, it starts to feel messy when there is an incomplete row of photos hanging off the end of the page. If there is more content in the set, the last row should be full. However, since we fetch photos from the API in fixed batch sizes, things don’t always work out so nicely, leaving “leftovers” in the bottom row. Borrowing from typesetting terminology, we call these leftover photos orphans. (We can also paginate backwards; leftovers at the top are technically widows but we’ll just keep using the term orphans for simplicity.)

jQuery - TUTO - Le sélecteur jQuery - débuter en jQuery

$ : le sélecteur raccourci __ Encore une petite précision : dans mon extrait de code ci-dessus, vous voyez que j'ai ajouté un paramètre $ pour ma fonction anonyme, et que j'ai ensuite utilisé $() à la place de jQuery().__En fait, $() est un alias de la fonction jQuery() (un autre nom pour la même fonction), on l'utilise plus souvent que jQuery(), tout simplement parce que c'est plus court à écrire ! __ Le seul problème est que d'autres framework javascript (Mootools nottament) utilisent également $ comme raccourci, du coup si vous utilisez plusieurs frameworks sur la même page, il y aura des conflits. ___ Heureusement, jQuery propose un mode noConflict(). Dans ce mode, le raccourci $ n'est pas créé pour éviter les problèmes. Le mode noConflict est par exemple activé par défaut dans Wordpress, donc $ ne marche pas et il faut donc se rabattre sur jQuery() à la place, la loose -_-'. __ L'astuce que j'ai utilisée me permet d'utiliser $ comme raccourci SEULEMENT à l'intérieur de ma fonction anonyme. Comme ça, même sous Wordpress où le mode noConflict est activé, je pourrais utiliser $ à l'intérieur de mon jQuery(document).ready.

DEV -Code Examples - Google Charts — Google Developers

(via)
Here are some code samples to demonstrate using the Google Visualization API. Table Example Customized Table Example Gauge Example Interaction Example Full HTML Page Example Query Wrapper Example Table Query Wrapper Example Mouseover Tool Tip Example

Custom Buttons • Toggle Style Lite (USERSTYLES)

Toggles a single style enabled/disabled with the click of toolbar button. Ctrl + left-click or middle-click button for Options/Settings Dialog (pic 1). Settings for entering style id and keyboard shortcut. Default is (ctrl + x). Pops an alert box if id is not found. Enter an id number with an r behind it for an auto restart (pic 2). For key code: Click button"Get Key Code" (pic 1) from Settings dialog. Press a key on keyboard and popup displays the Key Code number. Cancel allows for another selection and OK inserts the number into the script. Option Use Help CSS for enabling help tab section for css entries. Option to change Enabled/Disabled state toolbarbutton icons. Change any/all text labels from Options/Settings Dialog.