Go to Sublime Text 2 > Preferences > Key Bindings - User
and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}
Go to Sublime Text 2 > Preferences > Key Bindings - User
and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}
Titanium.App.addEventListener("playvideo", function (e) { | |
var win11 = Titanium.UI.createWindow({ | |
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT], | |
title: "Video", | |
zIndex: 222222 | |
}); | |
var activeMovie = Titanium.Media.createVideoPlayer({ | |
fullscreen: !0, | |
autoplay: !0, |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
This is an easy way to integrate a basic Instagram feed into a WordPress site.
First, register with Instagram's developer program, then register a client. Set the client ID they provide you in line 4.
Second, get your Instagram user ID by running this in your terminal:
curl -X GET https://api.instagram.com/v1/users/search\?q\=USERNAME\&client_id\=CLIENT_ID
import { appRouter } from 'server' | |
import type { APIContext } from 'astro' | |
import { resolveHTTPResponse } from '@trpc/server' | |
import type { HTTPHeaders } from '@trpc/client' | |
/** | |
* Handles trpc query client requests. | |
* | |
* @param {APIContext} - Astro API Context | |
* @returns {Promise<Response>} - trpc response |
// Requires the gpt library from https://github.com/hrishioa/socrate and the progress bar library. | |
// Created by Hrishi Olickel (hrishioa@gmail.com) (@hrishioa). Reach out if you have trouble running this. | |
import { ThunkQueue } from '../../utils/simplethrottler'; | |
import { | |
AcceptedModels, | |
Messages, | |
askChatGPT, | |
getMessagesTokenCount, | |
getProperJSONFromGPT, |