Skip to content

Instantly share code, notes, and snippets.

View Yavari's full-sized avatar

Payam Yavari Yavari

View GitHub Profile
@dgosbell
dgosbell / deploy-BimFile.ps1
Created January 15, 2019 22:09
A simple example of how to manually deploy a model.bim file using Powershell
#Requires -Version 3.0
param(
[Parameter(Mandatory=$true)]
[string]$serverName,
[Parameter(Mandatory=$true)]
[string]$databaseName,
[Parameter(Mandatory=$true)]
[string]$pathToBimFile
)
@nrollr
nrollr / nginx.conf
Last active April 22, 2024 15:11
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@a-h
a-h / program.cs
Created October 17, 2014 09:02
Handle merge conflicts in NuGet packages.config files
using System.Xml.Serialization;
using System.IO;
public static class Program
{
void Main()
{
AcceptLatestPackages(@"C:\projects\MergeMigrations_AddTableB\");
}
@02strich
02strich / dlna_proxy.py
Created May 2, 2013 19:33
DLNA Proxy (including SSDP and Multicast)
import socket, thread, sys
import logging
BUFLEN = 1024
logger = logging.getLogger(__name__)
class DLNAProxy(object):
MEDIASERVER_IP = ""
@gorbach
gorbach / BoundItemView.coffee
Created November 29, 2012 19:24
Bound Item View. Uses Backbone.Marionette and Model.Binder
BoundItemView extends Backbone.Marionette.ItemView
events: {}
initialize: ->
@events['click .btn-primary'] = 'save'
@modelBinder = new Backbone.ModelBinder()
super()
onRender: () ->
@modelBinder.bind @model, @el, @bindings
@jrafanie
jrafanie / gitremoteaddall.sh
Created April 27, 2012 16:03 — forked from mausch/gitremoteaddall.sh
Adds all github forks in the network for a particular repository - sed -r option (linux) is -E on mac
mainrepo="mausch/solrnet"
urls=$(curl -s "https://github.com/api/v2/json/repos/show/$mainrepo/network" | python -mjson.tool | grep "url" | grep -vi "$mainrepo" | sed -Ee 's/.*(https.*)".*/\1/')
for url in $urls; do
remote=$(echo $url | cut -d/ -f4)
giturl=$(echo $url | sed -Ee 's/https/git/;s/$/.git/')
git remote add $remote $giturl
done
class ImportController << ApplicationController
require 'net/http'
require 'net/https'
require 'uri'
#THIS METHOD TO SEND USER TO THE GOOGLE AUTHENTICATION PAGE.
def authenticate
# initiate authentication w/ gmail
# create url with url-encoded params to initiate connection with contacts api