This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Written by Danny Gershman November 16, 2012 | |
| --For cloning a database for staging a release | |
| SET ANSI_NULLS ON | |
| GO | |
| SET QUOTED_IDENTIFIER ON | |
| GO | |
| CREATE PROCEDURE wrench_Table_Clone | |
| @databaseName varchar(50), | |
| @restoredName varchar(50) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mkdir /etc/racoon/remote | |
| sudo mv /var/run/racoon/*.conf /etc/racoon/remote | |
| sudo sed -i.bak 's/lifetime time 3600 sec/lifetime time 168 hours/' /etc/racoon/remote/*.conf | |
| sudo patch /etc/racoon/racoon.conf <<EOF | |
| --- /etc/racoon.orig/racoon.conf 2009-06-23 09:09:08.000000000 +0200 | |
| +++ /etc/racoon/racoon.conf 2009-12-11 13:52:11.000000000 +0100 | |
| @@ -135,4 +135,5 @@ | |
| # by including all files matching /var/run/racoon/*.conf | |
| # This line should be added at the end of the racoon.conf file | |
| # so that settings such as timer values will be appropriately applied. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| else if (navigator.vendor.toLowerCase().indexOf("google") > -1 && swfobject.getFlashPlayerVersion().major == 12) { | |
| _modes.push(_html5, _flash, _download); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Embedded PDF downloader | |
| // @namespace http://www.versomas.com/ | |
| // @version 0.1 | |
| // @description Replaces object tag for the PDF and replaces it with a simple link for download | |
| // @match http://userscripts.org/scripts/show/181143 | |
| // @copyright 2014, radius314 | |
| // ==/UserScript== | |
| var letterLink = $("object")[0].data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @SEARCHSTRING VARCHAR(255), @notcontain Varchar(255) | |
| SELECT @SEARCHSTRING = 'phone_numbers', @notcontain = '' | |
| SELECT DISTINCT OBJECT_SCHEMA_NAME(sysobjects.id) + '.' + sysobjects.name AS [Object Name] , | |
| case when sysobjects.xtype = 'P' then 'Stored Proc' | |
| when sysobjects.xtype = 'TF' then 'Function' | |
| when sysobjects.xtype = 'TR' then 'Trigger' | |
| when sysobjects.xtype = 'V' then 'View' | |
| end as [Object Type] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET NOCOUNT ON | |
| DECLARE @tmp TABLE | |
| ( | |
| Id int identity(1,1), | |
| Name nvarchar(255) | |
| ) | |
| INSERT INTO @tmp | |
| SELECT Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| install and set password | |
| - sudo apt-get install x11vnc | |
| - x11vnc -storepasswd | |
| create autostart entry | |
| - cd .config | |
| - mkdir autostart | |
| - cd autostart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var bits = function(val, max) { for (var i = 0; i <= max; i++) console.log(val & (1 << i)); }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function func_portinuse() { | |
| lsof -n -i4TCP:$1 | grep LISTEN | |
| } | |
| function func_findall() { | |
| grep -RnisI $1 * | |
| } | |
| alias ll='ls -al' | |
| alias h='history' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ResourceManager rm = new ResourceManager(ConfigurationManager.AppSettings["JSResourcesAssemblyType"].ToString(), | |
| Assembly.LoadFile(ConfigurationManager.AppSettings["JSResourcesAssemblyPath"].ToString())); | |
| if (context.Request.QueryString["CultureCode"] == null) return; | |
| var culture = context.Request.QueryString["CultureCode"].ToString(); | |
| ResourceSet rs = rm.GetResourceSet(new CultureInfo(culture), true, true); | |
| var sbInitial = "var rm = {"; | |
| var sb = new StringBuilder(sbInitial); | |
| var resEnum = rs.GetEnumerator(); |