Skip to content

Instantly share code, notes, and snippets.

View ajsb85's full-sized avatar
🖼️
Engaging cognitive processors...

Alexander Salas Bastidas ajsb85

🖼️
Engaging cognitive processors...
View GitHub Profile
@hgouveia
hgouveia / packtpub_redeem.sh
Created April 11, 2017 06:45
Script to redeem automatically books from `https://www.packtpub.com/packt/offers/free-learning` using bash and cronjob
#!/bin/bash
#==INSTRUCTIONS
# - Add EMAIL and PASS infomation
# - Replace script path with your path `/home/USER/scripts/` in the script
# - Check your machine timezone `date +"%Z %z"` output ex: UTC +0000
# - patckpub.com is UTC +0000, find the best hour for you to use in the crontab
# - Execute `crontab -e`
# - Add `0 1 * * * /bin/sh /home/USER/scripts/packtpub_redeem.sh > /home/USER/scripts/packtpub_redeem.out` , this mean everyday 1am
# - Restart Service `sudo service cron reload` (optional, crontab -e, will reload)
# - Add Permission `chmod 755 /home/USER/scripts/packtpub_redeem.sh`
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<REQUEST>
<QUERY>INVENTORY</QUERY>
<DEVICEID>861946037669183-2016-10-06-13-26-18</DEVICEID>
<CONTENT>
<ACCESSLOG>
<LOGDATE>2016-30-08 05:11:48</LOGDATE>
<USERID>N/A</USERID>
</ACCESSLOG>
<HARDWARE>
@mojodna
mojodna / 0_register_planet.sql
Last active May 18, 2022 17:51
Sample OSM Athena queries
--
-- This will register the "planet" table within your AWS account
--
CREATE EXTERNAL TABLE planet (
id BIGINT,
type STRING,
tags MAP<STRING,STRING>,
lat DECIMAL(9,7),
lon DECIMAL(10,7),
nds ARRAY<STRUCT<ref: BIGINT>>,
@jcloutz
jcloutz / .golang-example-gitlab-ci.yml
Last active December 6, 2022 11:20
Example Gitlab CI setup for Go using the official golang docker image
image: golang:1.7
stages:
- build
- test
before_script:
- go get github.com/tools/godep
- cp -r /builds/user /go/src/github.com/user/
- cd /go/src/github.com/user/repo
@ajsb85
ajsb85 / robohash.js
Created January 6, 2017 18:25
Robohash blueprints
// This Python file uses the following encoding: utf-8
var os = require('os');
var hashlib = require('hashlib');
from PIL var Image = require('Image');
var natsort = require('natsort');
class Robohash(object)) {
/*
Robohash is a quick way of generating unique avatars for a site.
The original use-case was to create somewhat memorable images to represent a RSA key.
@ajsb85
ajsb85 / pouchdb.service.js
Last active December 30, 2016 17:35
Load PouchDB with AngularJS
angular.module('myModule').service('loadPouchDB', ['$window', '$q',
function ($window, $q) {
$window.Promise = $q.when();
var deferred = $q.defer();
function loadScript() {
// Use global document since Angular's $document is weak
var script = document.createElement('script');
document.body.appendChild(script);
script.onload = function () {
$window.removeEventListener('load', loadScript, false);
@ReneHollander
ReneHollander / main.cpp
Created December 29, 2016 16:08
Skia on the Raspberry Pi
#include <iostream>
#include <assert.h>
#include <stdio.h>
#include <cstdio>
#include <bcm_host.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
@ajsb85
ajsb85 / template.flyve-mdm.md
Created December 20, 2016 13:28
Template for Issues on Flyve MDM projects

Description

Expected behaviour

Actual behaviour

Environment Details

  • GLPi version:
  • Browser Type:
@ajsb85
ajsb85 / .hyper.js
Last active December 16, 2016 18:20
Zenburn Theme for Hyper
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: "Consolas, 'Courier New', monospace",
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: '#8faf9f',
@ajsb85
ajsb85 / readme.md
Last active December 14, 2016 11:50 — forked from max-mapper/readme.md
IRC OP protips

IRC OP PROTIPS

FLAGS #flyve-mdm ajsb85 +*

check if the nick of the user is registered with /msg nickserv info <name>

if it is registered, you can use: /msg chanserv akick #channelname add <name> and then chanserv will automagically add the IP bans when they join