Skip to content

Instantly share code, notes, and snippets.

View cyanly's full-sized avatar
😽
✧˖° Rust

Chao Yan cyanly

😽
✧˖° Rust
View GitHub Profile
@leonardo-m
leonardo-m / gist:6e9315a57fe9caa893472c2935e9d589
Last active June 19, 2024 05:43
A selection of 101 LINQ Samples converted to Rust
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3.
#![feature(ordering_chaining, step_by)]
fn main() {
// linq5: Where - Indexed
/*
//c#
public void Linq5()
{
#!/bin/bash
#
# Author: Jacer Omri
# Description:
# text to speech engine using google
## a function to encode urls
rawurlencode() {
local string="${1}"
local strlen=${#string}
@jonnyreeves
jonnyreeves / index.html
Created April 23, 2012 21:38
JavaScript Class Structure using requireJS. The following code shows you how to create a Class definition in one JavaScript file and then import it for use in another; coming from an ActionScript 3 background this (and some of JavaScript specific traits)
<!DOCTYPE html>
<html>
<head>
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script>
</head>
<body>
<p>Check your JavaScript console for output!</p>
</body>
</head>
@acacio
acacio / upnp.js
Created January 12, 2012 21:17
UPNP Port Forwarding for node.js
/* node UPNP port forwarding PoC
This is a simple way to forward ports on NAT routers with UPNP.
This is a not-for-production hack that I found useful when testing apps
on my home network behind ny NAT router.
-satori
usage:
@crodas
crodas / install-node.sh
Created June 9, 2011 03:50 — forked from gleicon/zemitter.js
ZeroMQ and Node.js pub/sub emitter
#!/bin/bash -x
# crodas
# get code from git
if [[ ! -d node ]]
then
git clone git://github.com/joyent/node
fi
cd node/