Skip to content

Instantly share code, notes, and snippets.

View PJUllrich's full-sized avatar

Peter Ullrich PJUllrich

View GitHub Profile
name: Update data
on:
schedule:
- cron: "0 5 * * *"
jobs:
execute:
runs-on: ubuntu-latest
defmodule Support.FeatureCase do
@moduledoc false
use ExUnit.CaseTemplate
using do
quote do
@moduletag :feature
use Wallaby.DSL
name: Elixir CI
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
@PJUllrich
PJUllrich / pubsub.ex
Last active December 23, 2021 19:48
PubSub Library for broadcasting results of Ecto operations
defmodule MyApp.PubSubLib do
@moduledoc """
This library implements easy to use Publish-Subscribe functionality.
## Usage
Use this library with `use MyApp.PubSubLib`.
## Example
defmodule MyApp.MyPublishingModule do
@PJUllrich
PJUllrich / demo
Last active June 19, 2018 19:58
Solidity Call, Callcode, Delegatecall Demo. Deploy contracts. Call functions and see how sender changes in either B, or C.
pragma solidity ^0.4.24;
contract A {
address public sender;
function dcall(B other, C child) public {
other.dcall(child);
}
}
@PJUllrich
PJUllrich / pushover.sh
Last active October 23, 2023 20:49
Bash script to send your IP via Pushover
#!/bin/bash
IP=`hostname -I | awk '{print $1}'`
MESSAGE="Pi ${HOSTNAME} fully booted. New IP: $IP"
TITLE="`whoami`@${HOSTNAME}"
APP_TOKEN="YOUR_APP_TOKEN_HERE"
USER_TOKEN="YOUR_USER_TOKEN_HERE"
wget https://api.pushover.net/1/messages.json --post-data="token=$APP_TOKEN&user=$USER_TOKEN&message=$MESSAGE&title=$TITLE" -qO- > /dev/null 2>&1 &
from observer.observer_pattern import Observable, Observer
class Elf:
name = 'Galadriel'
def nall_nin(self):
print('Elf says: Calling the Overlord ...')