This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL = /bin/sh | |
.SUFFIXES: .png | |
# Should be square | |
ICON=Icon-1024.png | |
all: Icon-29.png [email protected] [email protected] Icon-40.png [email protected] [email protected] [email protected] [email protected] Icon-76.png [email protected] | |
clean: | |
-rm Icon-29* | |
-rm Icon-40* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import imaplib | |
from email.parser import HeaderParser | |
mail = imaplib.IMAP4_SSL('imap.gmail.com') | |
mail.login('[email protected]', 'yourpassword') | |
mail.select("[Gmail]/All Mail") | |
# Execute an IMAP search query | |
status, data = mail.search(None, '(OR (FROM "[email protected]") (FROM "[email protected]"))') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# homebrew formula for building liquid-dsp | |
# cp to /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/liquid-dsp.rb and | |
# brew install -i --HEAD liquid-dsp | |
class LiquidDsp < Formula | |
desc "liquid-dsp, a free and open-source signal processing library for software-defined radios written in C." | |
homepage "http://liquidsdr.org/" | |
head "https://github.com/jgaeddert/liquid-dsp.git" | |
depends_on "fftw" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use pegjs online evaluator to try | |
https://pegjs.org/online | |
Input sample: | |
albin food 100.00 | |
juliana food 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
# Q: What is this? | |
# A: It's a shell script that updates what ip address your iwantmyname.com domain resolves to. | |
# I use it from cron. | |
# Q: What do I have to do? | |
# A: Add your username and password. Change the domain. Add it to your crontab. | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List disks so you know which ones which. | |
$ diskutil list | |
# Unmount if mounted. | |
$ diskutil unmountDisk /dev/diskX | |
# Write iso with dd. | |
$ sudo dd if=ubuntu-17.04-desktop-amd64.iso of=/dev/diskX bs=1M | |
# You can press ctrl-t to check progress. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>gnu.emacs.daemon</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/emacs</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// qe.c | |
// hidtest | |
// | |
// Created by Albin Stigö on 09/09/2017. | |
// Copyright © 2017 Albin Stigo. All rights reserved. | |
// | |
// License BSD | |
// https://opensource.org/licenses/BSD-2-Clause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/sys/unix" | |
"log" | |
"os" | |
) | |
func main() { | |
file, err := os.Open("/sys/class/somefile") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package epoll | |
import ( | |
"golang.org/x/sys/unix" | |
"os" | |
) | |
type Op uint32 | |
const ( |
OlderNewer