Skip to content

Instantly share code, notes, and snippets.

// myapp.js
$(function() {
var tabs=function(id) {
$(".tab").removeClass("active").filter(".tab[href*='" + id + "']").addClass("active");
$(".tabview").hide().filter("#" + id).show();
}
window.realDate=function(timestamp) {
var date = new Date(timestamp*1000);
@ludorumjeoun
ludorumjeoun / sample.html
Last active April 26, 2024 08:47
md5 utf8_encode 의존성 제거함.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="simplate.js"></script>
<script type="text/javascript">
@bjjay
bjjay / jsTemplate
Created June 20, 2012 10:23
javascript template
// By default, Underscore uses ERB-style template delimiters, change the
// following template settings to use alternative delimiters.
_.templateSettings = {
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
};
// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
@spion
spion / u-template.js
Created October 26, 2012 11:57
JS micro-templating
module.exports = function compile(str) {
var code = "var p=[],print=function(){p.push.apply(p,arguments);};"
+ "with(obj){p.push('" + str.replace(/[\r\t\n]/g, " ")
.split("<@").join("\t")
.replace(/((^|@>)[^\t]*)'/g, "$1\r")
.replace(/\t=(.*?)@>/g, "',$1,'")
.split("\t").join("');")
.split("@>").join("\np.push('")
.split("\r").join("\\'") + "');}return p.join('');";
return new Function("obj", code);
@techjewel
techjewel / tmpl.js
Last active April 26, 2024 08:45
Simple JS Templating
// Simple JavaScript Templating
// John Resig - http://ejohn.org/ - MIT Licensed
// source http://ejohn.org/blog/javascript-micro-templating/
(function(){
var cache = {};
this.tmpl = function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?

How to install Homebrew package manager on Steam Deck

(See also installing Distrobox: https://distrobox.it/ )
(See also installing Nix package manager: https://determinate.systems/posts/nix-on-the-steam-deck )

You can install Homebrew (a package manager for macOS and Linux) without disabling the read-only partition with sudo steamos-readonly disable.
The package manager can be used alongside Flatpaks. Some software is only available on Flathub, and some software is only available on Homebrew.

  1. Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
  2. Click the logo at the bottom left, go to System, then go to Konsole
@jethrolarson
jethrolarson / _.template.js
Created January 19, 2012 00:56
Mod of _.template binds `this` to the element passed in, and adds <%@varname%> as a handy shortcut to <%=this.varname%>
//OVERWRITING Underscore.js's templates
// By default, Underscore uses ERB-style template delimiters, change the
// following template settings to use alternative delimiters.
_.templateSettings = {
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
value : /<%@([\s\S]+?)%>/g // inserts value of a variable on the object or "" if undefined
});
@donpdonp
donpdonp / uTemplate.js
Created February 24, 2015 17:58
js micro templating
var _tmplCache = {}
this.parseTemplate = function(str, data) {
/// <summary>
/// Client side template parser that uses &lt;#= #&gt; and &lt;# code #&gt; expressions.
/// and # # code blocks for template expansion.
/// NOTE: chokes on single quotes in the document in some situations
/// use &amp;rsquo; for literals in text and avoid any single quote
/// attribute delimiters.
/// </summary>
/// <param name="str" type="string">The text of the template to expand</param>
# Latest available updates for Windows 10 version 1809 #
32-bit (x86)
Servicing Stack Update
https://www.catalog.update.microsoft.com/Search.aspx?q=servicing+stack+1809
click on "Last Updated" column to sort by newest update
Update to remove Adobe Flash Player
http://download.windowsupdate.com/d/msdownload/update/software/updt/2020/10/windows10.0-kb4577586-x86_947f151a8bb5a0b0797702e53431c52d56c02c32.msu
@ocpinfo
ocpinfo / index.vue
Last active April 26, 2024 08:46
Use renderjs to support Fetch usage for APP.vue in Uniapp environment
The demo code is as below:
<template>
<view @click="test.qafetch" data-role="button" >
<span class="ui-text ">发 送</span>
</view>
</template>
<script module="test" lang="renderjs">
export default {
data() {