Skip to content

Instantly share code, notes, and snippets.

View lfuelling's full-sized avatar
⚠️
thisisunsafe

Lerk lfuelling

⚠️
thisisunsafe
View GitHub Profile
#* * * * * command to be executed
#- - - - -
#| | | | |
#| | | | +----- day of week (0 - 6) (Sunday=0)
#| | | +------- month (1 - 12)
#| | +--------- day of month (1 - 31)
#| +----------- hour (0 - 23)
#+------------- min (0 - 59)
@nicolaisueper
nicolaisueper / smoosh.js
Created March 19, 2018 14:24
smoosh and smooshMap JavaScript implementation
Array.prototype.smoosh = function () {
function smooshInternal(array) {
var smooshed = [];
for (var i = 0; i < array.length; i++) {
if (array[i] instanceof Array) {
smooshed.push.apply(smooshed, smooshInternal(array[i]));
} else {
smooshed.push(array[i]);
}
}
@dansup
dansup / deploy.sh
Last active July 29, 2019 20:08
Pixelfed development deployment script
cd /home/forge/pixelfed.social
git pull origin dev
composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
php artisan config:cache
php artisan migrate --force
php artisan horizon:purge
php artisan horizon:terminate
@josephrace
josephrace / .gitlab-ci.yml
Created May 18, 2017 17:44
Configuration file for create-react-app on GitLab Pages
image: node:7.9.0 # change to match your node version
cache:
paths:
- node_modules/
before_script:
- npm install
test:
@MickaelBergem
MickaelBergem / owncloud-docker-compose.yml
Last active August 22, 2021 23:41
Docker Compose file for setting up an ownCloud server using a PostgreSQL database
# Composition of the containers
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db
set -l data_status (curl -s https://iceportal.de/api1/rs/status)
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip)
# next stop
echo  (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ]
| first).station.name')
# train number
echo  (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"')
# speed
echo speed (echo $data_status | jq -r '"\(.speed) km/h"')
@riptidewave93
riptidewave93 / distro
Created April 22, 2015 15:06
Observium /usr/bin/distro script
#!/bin/sh
# Detects which OS and if it is Linux then it will detect which Linux Distribution.
OS=`uname -s`
REV=`uname -r`
MACH=`uname -m`
if [ "${OS}" = "SunOS" ] ; then
OS=Solaris
ARCH=`uname -p`
@BeauBouchard
BeauBouchard / Grandtheftauto5-linux.md
Last active March 8, 2022 08:54
How to install Grand Theft Auto V on Linux (Ubuntu x64 14.04) using wine.

How to install Grand Theft Auto V on Linux (Ubuntu x64 14.04) using wine.

Date Completed: Not done yet ~~ April 23rd 2015

My Test System

  • Video Card: Nvidia GTX 465 (lol right? Game runs shitty)
  • Driver: tested on 331.38, works on 331.38+
  • OS: Ubuntu x64 14.04
  • POL: I used Play on linux 4, I assume most of the capabilities are in winetricks
  • Wine: wine-staging Sun, 19 Apr 2015 version 1.7.41 x64 bit
@soultech67
soultech67 / ruby_readline_issue.md
Last active June 6, 2022 21:18
ruby bundler: Sorry, you can't use byebug without Readline

Preamble

On OS/X Sierra, after recently running a brew update I started receiving the error message Sorry, you can't use byebug without Readline when trying to run some rake tasks in my ruby project folder. I observed this in projects and gems that include byebug or pry in their Gemfile or gem.spec. I've found in my googling that many begin encountering this error message after running a brew update but there are other triggering conditions as well.

>> rake aws:show_config
WARN: Unresolved specs during Gem::Specification.reset:
      mime-types (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
 Sorry, you can't use byebug without Readline. To solve this, you need to
@132ikl
132ikl / README.md
Last active July 28, 2022 09:54
Weenie Hut General Messaging Protocol

What is Weenie Hut General Messaging Protocol (WHGMP)?

WHGMP is a message protocol which uses 2 Discord bots and 9 channels.

(pssst... click here to see a more detailed project, with the main bot in addition to the messaging protocol)

How does it work?

WHGMP uses the read/unread badge* in a channel to represent a bit (unread = 1, read = 0). By using 8 channels, one byte can be stored.

The sender waits for a message from the user, then begins to send messages to the data channels. After storing a single byte, a message is sent to the "clock" channel, letting the receiver know to check the read/unread status. Based off of that, a single byte is constructed. When a null-byte is received, the resulting string is printed.