Skip to content

Instantly share code, notes, and snippets.

View abaez's full-sized avatar

Alejandro Baez abaez

View GitHub Profile
@abaez
abaez / savvycal-ifttt-filter.ts
Created April 12, 2022 05:00
SavvyCal IFTTT filter to create todoist task
const payload = JSON.parse(MakerWebhooks.jsonEvent.JsonPayload).payload;
/**
* A user for the event
*/
interface User {
author: boolean;
email: string;
displayName: string;
}
@abaez
abaez / suw.lua
Created May 21, 2018 15:16
A sudo write for vis
--- a module for writing to to a file by increasing privilege
-- @author [Alejandro Baez](https://twitter.com/a_baez)
-- @module suw
--- cmd for sudo write and quit
local suwq = function()
local file = vis.win.file
vis:command((", > sudo tee %s"):format(file.name))
vis:command("q!")
@abaez
abaez / run.sh
Created December 29, 2015 02:10
archlinux arm veyron install
#!/bin/bash
sda="/dev/mmcblk1"
umount ${sda}*
echo "type g and w" && wait 3
fdisk $sda
cgpt create $sda
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l Kernel -S 1 -T 5 -P 10 $sda
@abaez
abaez / config.vimrc
Last active December 24, 2015 03:29
cvim config file
let searchengine duckduckgo = "https://duckduckgo.com/?q=%s"
let searchengine twitter = "https://twitter.com/search?q=%s"
let defaultengine = "duckduckgo"
let completionengines = ["duckduckgo", "twitter"]
let blacklists = ["*://mail.google.com/*","*://*twitter.com/*","*://iknow.jp/*","*://feedly.com/*", "*://*rememberthemilk.com/app/*", "*://*fastmail.com/mail/*"]
map J nextTab
map K previousTab
@abaez
abaez / Tupfile.moon
Last active August 29, 2015 14:25
Small snippet with macro for tup using Moonscript
--- Compiles any moon into lua.
-- @author [Alejandro Baez](https://twitter.com/a_baez)
-- @license [MIT](http://opensource.org/licenses/MIT)
-- @module Tupfile
--- a macro for moon compilation.
moon = (input) -> tup.frule {
inputs: {input},
command: "moonc %f",
outputs: {"%B.lua"}
@abaez
abaez / For.sublime-snippet
Last active August 29, 2015 14:16
Sublime Text 2 For loop
<snippet>
<tabTrigger>for</tabTrigger>
<scope>source.rust</scope>
<description>For Loop</description>
<content><![CDATA[
for ${1:i} in ${2:iterator} {
${3://}
}
]]></content>
@abaez
abaez / properties.lua
Last active November 15, 2016 15:18
Make textadept pretty
--- holds languages NOT to use semantic highlighting if semantic is on.
-- @param `language = true`: language being any one you choose.
local dont = {
perl = true,
yaml = true,
markdown = true,
}
-- enable semantic highlighting
_SEMANATIC = true
@abaez
abaez / twitch.sh
Created January 21, 2015 18:10
twitch screenshare with audio streamer script.
STREAM_KEY=""
STREAM_URL="rtmp://live.twitch.tv/app"
OUTPUT="$STREAM_URL/$STREAM_KEY"
#OUTPUT="out.flv"
#rm "out.flv"
DEVVID="x11grab"
FPS=25
VIDIN="hd1080"
@abaez
abaez / keybase.md
Last active September 3, 2015 01:43
identify

Keybase proof

I hereby claim:

  • I am abaez on github.
  • I am baez (https://keybase.io/baez) on keybase.
  • I have a public key whose fingerprint is 18E6 699F 387E 0CC7 6AE6 6B43 0978 8BCC E62B 55B3

To claim this, I am signing this object:

@abaez
abaez / textadept.desktop
Created August 28, 2014 21:23
textadept desktop linux icon with /usr/local install
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Textadept
GenericName=Text Editor
Comment=A simple and extensible text editor
Exec=/usr/local/bin/textadept
Icon=/usr/local/share/textadept/core/images/textadept.svg
Terminal=false