Skip to content

Instantly share code, notes, and snippets.

View alexstyl's full-sized avatar

Alex Styl alexstyl

View GitHub Profile
@dideler
dideler / bot.rb
Last active May 23, 2024 17:31
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@pchrysa
pchrysa / index.js
Last active February 10, 2017 10:27
Scrape with Cheerio
var fs = require('fs');
var request = require('sync-request');
var cheerio = require('cheerio');
var _ = require('lodash');
const months = ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'];
var dates = [];
const url = 'http://m.paginainizio.com/onomasticimob.php?mese=';
for (var m in months) {
@charbgr
charbgr / record-gif.sh
Last active October 26, 2016 13:52
Android - Gif Recording Device
#!/bin/bash
adb shell screenrecord --bit-rate=20M "/sdcard/recording.mp4" &
PID=$!
echo "Recording.. ($PID)"
read -n1 -r -p "Press any key to stop" key
kill -SIGHUP $PID
sleep 1
adb pull "/sdcard/recording.mp4"
echo "Gififying..."
gifify -r 60 "recording.mp4"
@JakeWharton
JakeWharton / build.gradle
Created July 19, 2014 00:17
Adding support-annotations jar to a Java module.
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
def logger = new com.android.build.gradle.internal.LoggerWrapper(project.logger)
def sdkHandler = new com.android.build.gradle.internal.SdkHandler(project, logger)
for (File file : sdkHandler.sdkLoader.repositories) {
project.repositories.maven {
url = file.toURI()