This file contains 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
(defun set-emacs-frames (variant) | |
(dolist (frame (frame-list)) | |
(let* ((window-id (frame-parameter frame 'outer-window-id)) | |
(id (string-to-number window-id)) | |
(cmd (format "xprop -id 0x%x -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT \"%s\"" | |
id variant))) | |
(call-process-shell-command cmd)))) | |
(defun set-emacs-theme-light () | |
(interactive) |
This file contains 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
#!/bin/bash | |
# Download and install the latest Papirus Icon theme | |
#set -x | |
set -e | |
DL_URL="https://github.com/PapirusDevelopmentTeam/papirus-icon-theme-gtk/archive/master.zip" | |
TARGET_DIR=$HOME/.icons | |
HASH_FILE=$TARGET_DIR/.papirus-icons.etag |
This file contains 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
identify -format "%wx%h,%f\n" * | grep '^1920x1080,' | colrm 1 10 | while read f; do mv "$f" /tmp/t; done |
This file contains 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
curl -d @recipe.json -H "Content-Type: application/json" "https://api.edamam.com/api/nutrition-details?app_id=${YOUR_APP_ID}&app_key=${YOUR_APP_KEY}" |
This file contains 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
{ | |
"uri" : "http://www.edamam.com/ontologies/edamam.owl#recipe_ec290b2568b7d745a0762f6d5db4a042", | |
"yield" : 15.0, | |
"calories" : 21814, | |
"dietLabels" : [ "LOW_CARB" ], | |
"healthLabels" : [ "DAIRY_FREE", "MILK_FREE", "PEANUT_FREE", "TREE_NUT_FREE", "SOY_FREE", "FISH_FREE", "SHELLFISH_FREE" ], | |
"cautions" : [ ], | |
"totalNutrients" : { | |
"ENERC_KCAL" : { | |
"label" : "Energy", |
This file contains 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
{ | |
"title": "Fresh Ham Roasted With Rye Bread and Dried Fruit Stuffing", | |
"prep": "1. Have your butcher bone and butterfly the ham and score the fat in a diamond pattern. ...", | |
"yield": "About 15 servings", | |
"ingr": [ | |
"1 fresh ham, about 18 pounds, prepared by your butcher (See Step 1)", | |
"7 cloves garlic, minced", | |
"1 tablespoon caraway seeds, crushed", | |
"4 teaspoons salt", | |
"Freshly ground pepper to taste", |
This file contains 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
import static moulder.moulds.Moulds.append; | |
import static moulder.moulds.Moulds.attr; | |
import static moulder.moulds.Moulds.forEach; | |
import static moulder.moulds.Moulds.text; | |
import static moulder.values.Values.seq; | |
import java.util.Arrays; | |
import java.util.List; | |
import moulder.MoulderShop; |
This file contains 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
(defun toggle-earmuffs () | |
"Add or remove earmuffs (asterisks at front and end) of | |
variables." | |
(interactive) | |
(let* ((saved-point (point)) | |
(variable (thing-at-point 'symbol)) | |
(bounds (bounds-of-thing-at-point 'symbol)) | |
(len (- (cdr bounds) (car bounds))) | |
(start-char (elt variable 0)) |