Caution
I've moved this gist over to a template repository here. Everything here is unmaintained...
Following are the extensions required for neovim:
| // Copyright (C) 2025 Gwendal Roué | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a | |
| // copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to permit | |
| // persons to whom the Software is furnished to do so, subject to the | |
| // following conditions: | |
| // |
Caution
I've moved this gist over to a template repository here. Everything here is unmaintained...
Following are the extensions required for neovim:
| #!/usr/bin/env bash | |
| set -e | |
| GITHUB_RUNNER_URL="https://github.com/actions/runner/releases/download/v2.311.0/actions-runner-linux-x64-2.311.0.tar.gz" | |
| TEMPL_URL="http://download.proxmox.com/images/system/ubuntu-23.04-standard_23.04-1_amd64.tar.zst" | |
| PCTSIZE="20G" | |
| if [ -z "$GITHUB_TOKEN" ]; then | |
| read -p "Enter github token: " GITHUB_TOKEN |
| --[[ | |
| Feature Ideas | |
| - different cycle lengths per instrument | |
| - Setting: "Crank to play", "very slow", "slow", "medium", "fast" | |
| - Setting: set key, scale | |
| - Key: C, C#, etc | |
| - Scale: Major, Minor, Dorian | |
| - change instrument for each track | |
| - 3 drum samples, plus pentatonic scale | |
| - randomize notes |
The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.
Python code at the bottom if you want to skip the fine details.
Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
This assumes you are now connected to the server via SSH.
sudo -s Enter root mode for admin accessgroupadd devgroup Create new group to be later granted access to /var/www/htmluseradd -G root,devgroup masterdev Create new root user. Also add to the devgrouppasswd masterdev Change password for the new root user(I wrote a bit about why Emacs and Vim on my blog and thought it might be nice to give some starting point for people that want to try it.)
If you just want to play around with Emacs & Evil mode do the following:
mkdir ~/.emacs.d/init.el into ~/.emacs.d/| class GradientView < UIView | |
| def initWithFrame(frame) | |
| if super | |
| rgb = CGColorSpaceCreateDeviceRGB() | |
| ptr = Pointer.new(:float, 8) | |
| ptr[0] = 1.0 | |
| ptr[1] = 0.0 | |
| ptr[2] = 0.0 | |
| ptr[3] = 1.0 | |
| ptr[4] = 0.0 |
| # coding: utf-8 | |
| require 'sinatra' | |
| set server: 'thin', connections: [] | |
| get '/' do | |
| halt erb(:login) unless params[:user] | |
| erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
| end | |
| get '/stream', provides: 'text/event-stream' do |