Skip to content

Instantly share code, notes, and snippets.

@leipzig
leipzig / mycd.sh
Created January 21, 2012 03:36
directory based history bash profile
function mycd()
{
#if this directory is writable then write to directory-based history file
#otherwise write history in the usual home-based history file
tmpDir=$PWD
echo "#"`date '+%s'` >> $HISTFILE
echo $USER' has exited '$PWD' for '$@ >> $HISTFILE
builtin cd "$@" # do actual cd
if [ -w $PWD ]; then export HISTFILE="$PWD/.dir_bash_history"; touch $HISTFILE; chmod --silent 777 $HISTFILE;
else export HISTFILE="$HOME/.bash_history";
@p1nox
p1nox / postgresql_configuration_on_ubuntu_for_rails.md
Last active July 20, 2024 11:55
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@panesofglass
panesofglass / Program.cs
Created March 21, 2013 11:49
Example of using end-to-end dynamic in a C# Web API project using Dapper for data access.
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlServerCe;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
@willurd
willurd / web-servers.md
Last active April 15, 2025 07:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@MoriTanosuke
MoriTanosuke / jekyll.groovy
Last active January 11, 2020 22:56
This is a simple post-receive-hook Groovy script for gitblit.
import com.gitblit.GitBlit
import com.gitblit.Keys
import com.gitblit.models.RepositoryModel
import com.gitblit.models.TeamModel
import com.gitblit.models.UserModel
import com.gitblit.utils.JGitUtils
import com.gitblit.utils.StringUtils
import java.text.SimpleDateFormat
import org.eclipse.jgit.api.CloneCommand
import org.eclipse.jgit.api.Git
@kulmam92
kulmam92 / Deploy-SSRSProject.ps1
Last active May 16, 2017 22:48 — forked from jstangroome/Deploy-SSRSProject.ps1
Deploy SSRS 2012 project to a Reporting server using ReportService2010 management endpoint(ReportService2010.asmx?WSDL)
#requires -version 2.0
<#
.SYNOPSIS
Deploy SSRS project to a Reporting server.
.DESCRIPTION
The Deploy-SSRSProject script installs an SSRS project(DataSource, DataSet, Report) file to a Reporting Server using ReportService20XX management endpoint.
http://technet.microsoft.com/en-us/library/ee640743(v=sql.105).aspx
1. Get datasource, report from the .rptproj file
2. Get report list from the $ReportListFile file
@staltz
staltz / introrx.md
Last active April 13, 2025 15:46
The introduction to Reactive Programming you've been missing
@daveselias
daveselias / Update-SSRS_Datasources
Last active August 29, 2015 14:05
PS script for updating the Connection string value in SSRS shared data sources
$OldSource = 'MySQLServer-01'
$NewSource = 'MySQLServer-02'
$URL = 'http://ReportServerName/ReportServer/ReportService2010.asmx?wsdl'
$URI = New-Object System.Uri($URL)
$SSRS = New-WebServiceProxy -Uri $URI -UseDefaultCredential
$DataSources = ($SSRS.ListChildren("/data sources", $true)).path
ForEach($Source in $DataSources){
@sbedford
sbedford / DeployReports.ps1
Last active June 16, 2020 11:59
SSRS Deployment Automation Snippets
##################################################################
### The following parameters are provided by Octopus Deploy. ###
### Uncomment these with default values for testing. ###
#################################################################
#$SSRSReportServerUrl = "http://ssrs/reportserver/reportservice2005.asmx"
#$SSRSDynamicDataSourceCredentialsUsername = ""
#$SSRSDynamicDataSourceCredentialsPassword = ""
#$SSRSReportFolder = "Project Folder"
#$SSRSSharedDataSourcePath = "/Data Sources/dsShared"
@marcanuy
marcanuy / gist:06cb00bc36033cd12875
Created July 11, 2015 13:35
The 5,000 Most Frequently Used Domain Name Prefixes and Suffixes
1. my+ 1001. se+ 2001. thedaily+ 3001. empire+ 4001. herb+
2. +online 1002. test+ 2002. giant+ 3002. +cook 4002. +teen
3. the+ 1003. fish+ 2003. survey+ 3003. +deluxe 4003. affordable+
4. +web 1004. hk+ 2004. +conference 3004. +crunch 4004. proto+
5. +media 1005. florida+ 2005. twit+ 3005. michigan+ 4005. +ity
6. web+ 1006. fine+ 2006. pick+ 3006. cars+ 4006. myhome+
7. +world 1007. loan+ 2007. +dvd 3007. +forest 4007. plastic+
8. +net 1008. page+ 2008. cinema+ 3008. yacht+ 4008. +kc
9. go+ 1009. fox+ 2009. desi+ 3009. +wallet 4009. +foot
10. +group 1010. +gift 2010. act+ 3010. +contest 4010. +sup