Skip to content

Instantly share code, notes, and snippets.

Avatar
🐳
hacking sophia

Philipp Piwo thepiwo

🐳
hacking sophia
View GitHub Profile
View learning_scala.org
@hkoba
hkoba / sched-reboot.service
Last active Sep 29, 2021
systemd service and timer for scheduled reboot.
View sched-reboot.service
[Unit]
Description=Scheduled Reboot
[Service]
Type=simple
ExecStart=/usr/bin/systemctl --force reboot
@himalay
himalay / color-emoji-on-linux.sh
Created Feb 26, 2017
Color emoji on Arch Linux.
View color-emoji-on-linux.sh
# create folders if does not exist
mkdir -p ~/.fonts
mkdir -p ~/.config/fontconfig/
# download noto color emoji font from https://www.google.com/get/noto/#emoji-zsye-color
# extract NotoColorEmoji.ttf file into ~/.fonts/
# create font config file
cat << 'EOF' > ~/.config/fontconfig/fonts.conf
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
@alekseykulikov
alekseykulikov / index.md
Last active Aug 8, 2020
Principles we use to write CSS for modern browsers
View index.md

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@lummie
lummie / gist:732b8cb0b478966b91a7f9244c7aeac7
Last active Apr 23, 2020
Change exif timezone with exiftool -8 hour
View gist:732b8cb0b478966b91a7f9244c7aeac7
// I'm forever forgetting to adjust the time zone on my camera when taking pictures on vacation
// this uses the linux exiftool to adjust the timezone -8 hours for all images in a directory
exiftool "-DateTimeOriginal-=0:0:0 8:0:0" *
View install-letsencrypt-in-jdk.sh
#!/bin/bash
set -e
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der
@andreparames
andreparames / bitbit.py
Last active Apr 9, 2016
Store strings on the very useful https://booleans.io/
View bitbit.py
import requests
def frombits(s):
bts = (int(s[i:i+8], 2) for i in range(0, len(s), 8))
return str(bytearray(bts))
def tobits(s):
return ''.join(bin(b)[2:].zfill(8) for b in bytearray(s))
def storebit(bit):
@w0rldart
w0rldart / install-mongodb.sh
Last active Jan 31, 2018
Installing MongoDB on Ubuntu 15.04
View install-mongodb.sh
#!/bin/sh
##
## Bash install script for mongo 3.2 for Ubuntu 15.04, because of
## the replacement of upstart with systemd
##
## - AUTHOR: Alexandru Budurovici <https://w0rldart.com>
## - VERSION: 1.0
##
@celoyd
celoyd / hi8-anim-howto.md
Last active Jul 12, 2021
A way to make Himawari-8 animations
View hi8-anim-howto.md

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active Sep 14, 2021
HowTo: Privacy & Security Conscious Browsing
View gist:3425484ac5cce5298932

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents