Skip to content

Instantly share code, notes, and snippets.

View IlanFrumer's full-sized avatar

Ilan Frumer IlanFrumer

  • Israel , Nahariya
View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active November 2, 2024 12:56
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@twilson63
twilson63 / csidoms.md
Created July 31, 2011 14:03
Common CoffeeScript Idoms - from the little book on CoffeeScript

Common CoffeeScript Idoms

Each

myfunction(item) for item in items

Map

@yurial
yurial / git-rebase--interactive.patch
Created February 25, 2012 16:29
show author on rebase
fix:
/usr/libexec/git-core/git-rebase--interactive
-git rev-list $merges_option --pretty=oneline --abbrev-commit\
+git rev-list $merges_option --pretty=">%h (%an <%ae>) %s"\
result:
1 pick 19f43c1 (Yuri Dyachenko <[email protected]>) add: gcrypt::noerr
2 pick 990a7e8 (Yuri Dyachenko <[email protected]>) add: gcrypt::throwif( err ) throw if err != noerr
3 pick cb03f3b (Yuri Dyachenko <[email protected]>) add: ext::move<T> move semantic

AngularJS-Learning

A bunch of links to blog posts, articles, videos, etc for learning AngularJS. This list is in its early stages. Feel free to submit a pull request if you have some links/resources to add. Also, I try to verify that the articles below have some real content (i.e. aren't 2 paragraph blog posts with little information) to ensure I'm not listing "fluff" pieces. If you have an idea for a better way to organize these links, please let me know. As I find similar posts in the "General Topics" section, I will break them out into their own categories.

Books

@zdwolfe
zdwolfe / gist:6721115
Last active October 1, 2018 06:38
Basic nginx configuration for AngularJS html5Mode
server {
listen 0.0.0.0:12345;
location / {
root /home/zdwolfe/src/angularAWS/app;
try_files $uri $uri/ /index.html =404;
}
}
@asciidisco
asciidisco / nha.md
Last active October 20, 2017 20:06
Node homeautomation
@morhekil
morhekil / nginx.conf
Created August 14, 2014 12:18
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@Ghostbird
Ghostbird / extra-jack-pulse-connections.sh
Last active June 26, 2023 01:02
Add extra pulseaudio - jack bridge connections to allow jack routing for pulseaudio applications
#!/bin/bash
sources=(telegram zoom teams discord extra)
sinks=(telegram kodi zoom teams discord extra)
startTime=$(date +%s)
function capitalise() {
echo $1 | sed -e "s/\b\(.\)/\u\1/g"
}
@NitsanBaleli
NitsanBaleli / enum-alternative.ts
Created June 30, 2021 07:03
typescript enum alternative
//https://stackoverflow.com/a/60041791/2460773
//https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums
export const mapConsumptionActiveMapType = {
elevation: "map",
orthomosaic: "elevation",
model_3d: "3d model",
} as const;
export type MapConsumptionActiveMapType = keyof typeof mapConsumptionActiveMapType;