Skip to content

Instantly share code, notes, and snippets.

View antonellopasella's full-sized avatar
💯

Antonello Pasella antonellopasella

💯
View GitHub Profile
@antonellopasella
antonellopasella / docker-compose.yaml
Created October 18, 2022 15:44
HomeAssistant osX M1
version: '3.9'
services:
home-assistant:
container_name: home-assistant
image: ghcr.io/home-assistant/home-assistant:stable
volumes:
- ./homeassistant/config:/config
environment:
- TZ=Europe/Rome
network_mode: host
@antonellopasella
antonellopasella / gist:3470482cb294c178d3fdfbba4240d2a6
Created October 7, 2019 09:23
Unfollow bulk linkedin in vanilla JS
setInterval( function() {
window.scrollBy(0,-1000);
setTimeout( function(){
window.scrollBy(0, 1500);
var buttons = document.getElementsByTagName('button');
for( i = 0; i < buttons.length; i++) {
if(buttons[i].className.indexOf('is-following') > 0) {
buttons[i].click();
}
}
{
"JobType":"588883e7c0ca874d9cb1b7fe",
"file":{
"filetype":"application/zip",
"filename":"jquery-timepicker-master.zip",
"filesize":63891,
"base64":"UEsDBAoAAAAAALSejEkAAAAAAAAAAAAAAAAZAAkAanF1ZXJ5LXRpbWVwaWNrZXItbWFzdGVyL1VUBQABxHBPWFBLAwQKAAAAAAC0noxJRo6WhSIAAAAiAAAAIwAJAGpxdWVyeS10aW1lcGlja2VyLW1hc3Rlci8uZ2l0aWdub3JlVVQFAAHEcE9YLkRTX3N0b3JlCiouc3cqCm5vZGVfbW9kdWxlcwouaWRlYVBLAwQKAAAACAC0noxJSsc5WZwBAACYAwAAJQAJAGpxdWVyeS10aW1lcGlja2VyLW1hc3Rlci9HcnVudEZpbGUuanNVVAUAAcRwT1iNUslOwzAQPSdfMSBVTqAN97BcuCEEB7gBBzeZpG4d29gOIqD+O+MsZRGg5hBlZt4ySxpdthIzfDXaegfnULWq8EKrpLat8im8x3HUf2ZCCX+pVSXq5D2OIrOpcxgqlSAJi7y8uru9SZjhxYbXmK2dViydE7ZBz3MIrGjJlUILObCTo4NHxeA4ZBkcwdnsHEg088JLhNkFvEyZF7SOWgq5xQ5WoiusMH4ofFO61Kazol55SIq0Jwx9emyM5B4zr0veJYcdPYdpkJ1EeetX2maKN/jdbaUbNDTUT6trUaBymO+Ackj8wJ08Kgop2IZ1tLUUVTcuRPcjOBjDLwsKkmFz2ZiaXbB5D7EYrkWI+k2YoDrIRqVwfpIJN3FTELH1c4u2o93SGKLYoM0aoehCLIeHX4pUeOqZ23h89Q6Fc0QbVenrc4r9/Ij/h2Go/Oa4diuhpqG4lP+2Gxjb9HT3x0rNyxvT3HO3cQnrc4tCK2/FcjHcgBF6D/Aw957goWX2pQ+L
{
"name": "3x1010-italo-nightmare",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "UNLICENSED",
<meta http-equiv="Content-Security-Policy" content="default-src * data: * gap: https://ssl.gstatic.com 'unsafe-eval'; style-src * 'unsafe-inline'; media-src *; img-src *">
var Nightmare = require('nightmare');
var nightmare = Nightmare({
show: true,
openDevTools: true,
'webPreferences': {
'webSecurity': false
}
});
var SCHEDULE = {
"events": [
{
"eventId": "9d831af2-60db-4dfa-86cf-5b10a130aadd",
"channelId": "CH-1",
"groupId": "GR-1",
"start": "2016-04-18T00:01:00.000Z",
"title": "Sleek Steel Cheese",
"end": "2016-04-18T00:42:00.000Z"
},
@antonellopasella
antonellopasella / gist:5411649
Created April 18, 2013 10:11
Implementing your own cache in AngularJs
Implementing your own cache in AngularJs is quite easy.
Just use $cacheFactory:
app.factory('myService', function($resource, $cacheFactory) {
var cache = $cacheFactory('myService');
var User = $resource('/user/:userId', {userId:'@id'});
return {
getResource: function(userId) {
var user = cache.get(userId);
@antonellopasella
antonellopasella / gist:5317373
Created April 5, 2013 07:46
Disable the creation of .DS_store files on network drives #osx #tip #defaults #write
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
To revert
defaults delete com.apple.desktopservices DSDontWriteNetworkStores