Search Results

Search found 42629 results on 1706 pages for 'dry run'.

Page 7/1706 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Get AutoHotkey Script To Run As Admin At Startup

    - by deadlydog
    A few weeks back I posted some problems with running AutoHotkey (AHK) in Windows 8, and that the solution was to run your AHK script as admin.  I also showed how to have the script start automatically when you logged into Windows.  What I didn’t realize at the time though was that the method only worked because I had disabled UAC in the registry (which prevents most Metro apps from working in Windows 8, and likely isn’t acceptable for most people). So here is a Windows 8, UAC-friendly method to accomplish the same task (also works in previous versions of Windows).  The trick is to use the Task Scheduler: 1. Open the Task Scheduler (also known as “Schedule tasks” in Windows 8 Settings).   2. Create a new Basic Task. 3. Give it a name and description (something like “launch AutoHotkey script at login”), and then specify to have it run “When I log on”.  Then specify that you want it to “Start a program”, and then point it towards your AutoHotkey script.  Before you finish the wizard, check off “Open the Properties dialog for this task when I click Finish”.   4. When that Properties dialog opens up, go to the Conditions tab and make sure none of the checkboxes under the Power category are checked off; this will ensure the script still launches if you are on a laptop and not plugged into AC power.   5. Now here is the important part; To have your script “Run as admin”, on the General tab check off “Run with highest privileges”. Now your AHK script should start automatically as soon as you log into Windows; even when UAC is enabled   6. If your AHK script uses an #Include statement to include other files, you may get an error similar to this one when your task runs: “#Include file … cannot be opened. The program will exit.” The solution to this is to tell your AHK script to start in the same directory as the file that you want to include.  So you will need to edit your scheduled task’s Action to specify the Start In directory. Happy coding!

    Read the article

  • Logging every time a command is run

    - by Tom D
    I want to log every time I run a certain type of command in the terminal. For example, every time I run: sudo apt-get install [something] I want to add [something] to a log file in my home directory that will look like the following: [timestamp] [something] 2012-10-02 mysql-server 2012-10-03 ruby1.9.1 2012-10-06 gedit-plugins 2012-10-07 gnome-panel synaptic What's the easiest way to make this happen automatically?

    Read the article

  • Run windows and ubuntu parallely

    - by user3185902
    I have read about Virtualbox using which we can run both windows and ubuntu parallely, but it seems that for this we have to make one host and install the other one using Virtualbox in it. (Please correct me if wrong) I am already using both ubuntu and windows on my pc (dual boot) and I want to run the already existing ones parallely instead of installing one of them again (don't want to install the softwares again). So, is there a way by which I can do this? Thanks

    Read the article

  • Run a shell script using cron

    - by Blanca
    Hi! I have this FeedIndexer.sh: #!/bin/sh java -jar FeedIndexer.jar Just to run FeedIndexer.jar which is in the same directory as the .sh, I would like to run it using crontab, so I did this: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) 01 01 * * * root run-parts --report /home/slosada/workspace/FeedIndexer/target/FeedIndexer.sh # But I don't know how to run it. Have i made any mistake?? Thank you!

    Read the article

  • Windows Task Scheduler does not start task at next run time

    - by Dan C
    I have a Windows Server 2008 SP 2 Task Scheduler task that should run every 10 minutes. The trigger says "At 6:50 PM every day - After triggered, repeat every 10 minutes for a duration of 1 day." Looking at the Next Run Time, it says 6/18/2012 8:00 PM. However, when I let that time pass, the Next Run Time just changes to 8:10 PM but the task has not started and the Last Run Time is unchanged from yesterday. How can I get this task to run every 10 minutes when enabled no matter what. Similarly, I have other tasks that need to run on slightly different schedules: Every 30 minutes (5:30, 6:00, 6:30, etc) Every 30 minutes (5:35, 6:05, 6:35, etc) How can I define these intervals? And why does the task not start at the indicated Next Run Time?

    Read the article

  • Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    - by Bakhtiyor
    I have mailserver configure using dovecot+postfix+mysql and it was runnig fine in the server(Ubuntu Server). But during last week it stopped working correctly. It doesn't send email. When I try to telnet localhost smtp I'm connecting successfully but when I do mail from:<[email protected]> and hit Enter it hangs on, nothing happen. Having reviewed /var/log/mail.log file I've found out that probably(99%) the problem is on postfix when it is trying to connect to MySQL server. If you see the log file given below you can see that it says Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Nov 14 21:54:36 ns1 dovecot: dovecot: Killed with signal 15 (by pid=7731 uid=0 code=kill) Nov 14 21:54:36 ns1 dovecot: Dovecot v1.2.9 starting up (core dumps disabled) Nov 14 21:54:36 ns1 dovecot: auth-worker(default): mysql: Connected to localhost (mailserver) Nov 14 21:54:44 ns1 postfix/postfix-script[7753]: refreshing the Postfix mail system Nov 14 21:54:44 ns1 postfix/master[1670]: reload -- version 2.7.0, configuration /etc/postfix Nov 14 21:54:52 ns1 postfix/trivial-rewrite[7759]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Nov 14 21:54:52 ns1 postfix/trivial-rewrite[7759]: fatal: mysql:/etc/postfix/mysql-virtual-alias-maps.cf(0,lock|fold_fix): table lookup problem Nov 14 21:54:53 ns1 postfix/master[1670]: warning: process /usr/lib/postfix/trivial-rewrite pid 7759 exit status 1 Nov 14 21:54:53 ns1 postfix/cleanup[7397]: warning: problem talking to service rewrite: Connection reset by peer Nov 14 21:54:53 ns1 postfix/master[1670]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling Nov 14 21:54:53 ns1 postfix/smtpd[7071]: warning: problem talking to service rewrite: Success I tried netstat -ln | grep mysql and it returns unix 2 [ ACC ] STREAM LISTENING 5817 /var/run/mysqld/mysqld.sock. The content of /etc/postfix/mysql-virtual-alias-maps.cf file is here: user = stevejobs password = apple hosts = localhost dbname = mailserver query = SELECT destination FROM virtual_aliases WHERE source='%s' Here I tried to change hosts = 127.0.0.1 but it says warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (110) So, I am lost and don't know where else to change in order to solve the problem. Any help would be appreciated highly. Thank you.

    Read the article

  • Using pkexec policy to run out of /opt/

    - by liberavia
    I still try to make it possible to run my app with root priveleges. Therefore I created two policies to run the application via pkexec (one for /usr/bin and one for /opt/extras... ) and added them to the setup.py: data_files=[('/usr/share/polkit-1/actions', ['data/com.ubuntu.pkexec.armorforge.policy']), ('/usr/share/polkit-1/actions', ['data/com.ubuntu.extras.pkexec.armorforge.policy']), ('/usr/bin/', ['data/armorforge-pkexec'])] ) additionally I added a startscript which uses pkexec for starting the application. It distinguishes between the two places and is used in the Exec-Statement of the desktopfile: #!/bin/sh if [ -f /opt/extras.ubuntu.com/armorforge/bin/armorforge ]; then pkexec "/opt/extras.ubuntu.com/armorforge/bin/armorforge" "$@" else pkexec `which armorforge` "$@" fi If I simply do a quickly package everything will work right. But if I package with extras option: quickly package --extras the Exec-statement will be exchanged. Even if I try to simulate the pkexec call via armorforge-pkexec It will aks for a password and then returns this: andre@andre-desktop:~/Entwicklung/Ubuntu/armorforge$ armorforge-pkexec (armorforge:10108): GLib-GIO-ERROR **: Settings schema 'org.gnome.desktop.interface' is not installed Trace/breakpoint trap (core dumped) So ok, I could not trick the opt-thing. How can I make sure, that my Application will run with root priveleges out of opt. I copied the way of using pkexec from synaptic. My application is for communicating with apparmor which currently has no dbus interface. Else I need to write into /etc/apparmor.d-folder. How should I deal with the opt-build which, as far as I understand, is required to submit my application to the ubuntu software center. Thanks for any hints and/or links :-)

    Read the article

  • Automark model names/attributes for translation

    - by Saosin
    Is there any way one could automatically mark all model names and attributes for translation, without specifying verbose_name/_plural on each one of them? Doesn't feel very DRY to do this every time: class Profile(models.Model): length = models.IntegerField(_('length')) weight = models.IntegerField(_('weight')) favorite_movies = models.CharField(_('favorite movies'), max_length=100) favorite_quote = models.CharField(_('favorite quote'), max_length=30) religious_views = models.CharField(_('religious views'), max_length=30) political_views = models.CharField(_('political views'), max_length=30) class Meta: verbose_name = _('profile') verbose_name_plural = _('profiles')

    Read the article

  • What CSS compiler do you use (SASS, Less, HSS, etc)?

    - by T.R.
    I've been looking to make things a little more DRY, both on my personal projects (django) and at work (JSP/struts,PHP). SASS+HAML seem to be quite popular, but, do those outside of the Ruby/Rails community generally use these as well, or do they opt for other solutions? Which do you use, and what was the reasoning behind the choice?

    Read the article

  • DRY programming dilemma

    - by fayer
    the situation is like this: im creating a Logger class that can write to a file but the write_to_file() function is in a helper class as a static function. i could call that function but then the Log class would be dependent to the helper class. isn't dependency bad? but if i can let it use a helper function then what is the point of having helper functions? what should one prioritize here: using helper functions and have to include this helper class everywhere (but the other 99 methods wont be useful) or just copy and paste into the Log class (but then if i have done this 100 times and then make a change i have to change in 100 places). share your thoughts and experience!

    Read the article

  • Rails - Seeking a Dry authorization method compatible with various nested resources

    - by adam
    Consensus is you shouldn't nest resources deeper than 1 level. So if I have 3 models like this (below is just a hypothetical situation) User has_many Houses has_many Tenants and to abide by the above i do map.resources :users, :has_many => :houses map.resorces :houses, :has_many => :tenants Now I want the user to be able edit both their houses and their tenants details but I want to prevent them from trying to edit another users houses and tenants by forging the user_id part of the urls. So I create a before_filter like this def prevent_user_acting_as_other_user if User.find_by_id(params[:user_id]) != current_user() @current_user_session.destroy flash[:error] = "Stop screwing around wiseguy" redirect_to login_url() return end end for houses that's easy because the user_id is passed via edit_user_house_path(@user, @house) but in the tenents case tenant house_tenent_path(@house) no user id is passed. But I can get the user id by doing @house.user.id but then id have to change the code above to this. def prevent_user_acting_as_other_user if params[:user_id] @user = User.find(params[:user_id] elsif params[:house_id] @user = House.find(params[:house_id]).user end if @user != current_user() #kick em out end end It does the job, but I'm wondering if there is a more elegant way. Every time I add a new resource that needs protecting from user forgery Ill have to keep adding conditionals. I don't think there will be many cases but would like to know a better approach if one exists.

    Read the article

  • DRY up Ruby ternary

    - by Reed G. Law
    I often have a situation where I want to do some conditional logic and then return a part of the condition. How can I do this without repeating the part of the condition in the true or false expression? For example: ClassName.method.blank? ? false : ClassName.method Is there any way to avoid repeating ClassName.method? Here is a real-world example: PROFESSIONAL_ROLES.key(self.professional_role).nil? ? 948460516 : PROFESSIONAL_ROLES.key(self.professional_role)

    Read the article

  • DRY jQuery for RESTful PUT/DELETE links

    - by Aupajo
    I'm putting together PUT/DELETE links, a la Rails, which when clicked create a POST form with an hidden input labelled _method that sends the intended request type. I want to make it DRYer, but my jQuery knowledge isn't up to it. HTML: <a href="/articles/1" class="delete">Destroy Article 1</a> <a href="/articles/1/publish" class="put">Publish Article 1</a> jQuery: $(document).ready(function() { $('.delete').click(function() { if(confirm('Are you sure?')) { var f = document.createElement('form'); $(this).after($(f).attr({ method: 'post', action: $(this).attr('href') }).append('<input type="hidden" name="_method" value="DELETE" />')); $(f).submit(); } return false; }); $('.put').click(function() { var f = document.createElement('form'); $(this).after($(f).attr({ method: 'post', action: $(this).attr('href') }).append('<input type="hidden" name="_method" value="PUT" />')); $(f).submit(); return false; }); });

    Read the article

  • More dry views?

    - by Pravin
    I have a simple index page for clients. Client has 20 fields. I am displaying list of clients in a table. For this I have to write in my views something like: - @clients.each do |client| %tr %td=client.name %td=client.email %td=client.address %td=client.phone etc... I am just curious if I can do it something like - @clients.each do |client| - client do %tr %td= name %td= email %td= address %td= phone etc...

    Read the article

  • Problem running Chrome from Start->Run

    - by ripper234
    When I hit Start-Run and type "Chrome", nothing happens (no new "chrome.exe" process is launched, not error, nothing). When I hit Start (without "Run"), type Chrome and run it, it works. How do I find what shortcut is run via Start-Run ? When I open a command prompt and write "Chrome.exe", it doesn't recognize it as an executable program.

    Read the article

  • Script to establish SSH tunnel and then run another program that uses the tunnel

    - by Rob Hills
    I am running a GUI app (Gnucash) that connects to a remote Postgres database via a secure shell session. I can use the SSH -L command to tunnel a local port and then separately run Gnucash and this works fine. What I'd like to do is use a single shell script that sets up the tunnel and then calls Gnucash. Is that possible? If so, how do I do it? Currently, I run commands like the following in 2 separate terminal windows: ssh -L 5433:127.0.0.1:19097 [email protected] gnucash postgres://gnucash@localhost:5433/gnucash_db If I simply put both lines in a shell script, the first line drops me into the remote shell and the second line doesn't execute until I exit the remote shell. TIA, Rob Hills

    Read the article

  • DLL-s needed to run ASP.NET MVC 3 RC on Windows Azure

    - by DigiMortal
    In this weekend I made one of my new apps run on Windows Azure. I am building this application using ASP.NET MVC 3 RC and Razor view engine. In this posting I will list DLL-s you need to have as local copies to get ASP.NET MVC 3 RC run on Windows Azure web role. Besides assemblies that are already references you may need to add references to some more assemblies. List of assemblies is here: Microsoft.Web.Infrastructure System.Web.Helpers System.Web.Mvc System.Web.Razor System.Web.WebPages System.Web.WebPages.Razor WebMatrix.Data You can find Razor and ASP.NET Web Pages related assemblies from folder: C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\ NB! If your project is using dynamically loaded assemblies that are not referenced from any of your project make sure you are including them as project items that are located in bin folder. This way these DLL-s are also put to deployment package and you don’t have to create code level references to them.

    Read the article

  • How can I run sudo gedit as gksu gedit

    - by SimplySimon
    I'm looking into ways of automatically loading Gedit as gksu gedit when I enter sudo gedit by mistake? I have found that I have made a number of files unreachable by using gedit and I have only just found out why! ACHIEVED SO FAR I have written a script which will make an alias so that if I type in sudo <application> it can automatically convert that to gksu <application> but I want to make this alias stick, so that I don't have to run the script every time I boot the computer. Is there a config file I can edit or should I run this script as a start up script (which would be inconvenient!)?

    Read the article

  • How to make a python script run in Anacron

    - by Jeremy
    I have a python script that I would like to run daily using anacron, but I haven't been able to get it to work. The script is in my home directory, and I have put a symlink to it in /etc/cron.daily/. I saw somewhere that things here can't have dots in the filename, so the symlink has the .py extension removed (the original file still has it). The python file does have #!/usr/bin/python on the first line. This is my first experience with cron / anacron, and so I'm sure I'm making a dumb mistake - I just don't know what it is. Is a symlink a problem? Do I need the actual file there? Is the python script the problem? Do I need to run a bash script that will open the python script? Is there something else I'm not thinking of?

    Read the article

  • How to run Ubuntu fully in initramfs?

    - by miernik
    I have a machine with 10 GB of RAM, and I would like to run Ubuntu on it (Debian also OK if its easier), fully in RAM in such a way: I boot from a compressed image on an USB flash disk, that is uncompressed into RAM, and then I can remove the disk from the USB slot, and use the system only with RAM, without any permanent disk. Whenever I make any changes that I want permanent, I would put the flash disk back into the USB slot (possibly not the same one as I used initially to boot, as I would like to keep many versions of the boot flash disk), and run some command that would save the current state into a compressed image on the disk. How can I set this up?

    Read the article

  • Creating natural environments that can run on lower end computers in Unity3D/C#

    - by Timothy Williams
    So, I'm starting work on a project soon that will require me to create realistic environments that can preferably run on PC's besides high quality ones. The goal is to get as real an environment as possible while still being easy(ish) to run. The only problem is I've NEVER done anything with 3D environments, making trees sway, grass move, lighting, etc. Can anyone give me any help? Perhaps describe how it's done? Link me to articles? I'm just looking to be pointed in the right direction, not for you to write the code for me. Any help at all would be greatly appreciated, I'm using Unity3D and C# as my language. Thanks, Tim.

    Read the article

  • JavaOne and Oracle Open World Community Run - Monday, Oct 1, 6:17am PT

    - by arungupta
    Following the tradition from last year, inviting all JavaOne and Oracle Open World attendees to run with me in one of the 10 best cities to run in the US. The running route will start at Ferry Plaza on Embarcadero, go through Fisherman's Wharf, straight up Hyde St, couple of loops around Crooked Street and then back the same route to end at Ferry Plaza. Here is the complete clickable map: The Hyde Street (~300ft in 0.75 miles) and Lombard (~200 ft in 0.15 mile) are challenging elevations and you may cover them once only. Alternatively you may take a simpler route out-and-back by running further up to Marina and Crissy Field. When ? Monday, Oct 1, 2012 I plan to leave at 6:17am PT from the starting point and certainly hope you can join me. Oracle is doing several things to keep Oracle Open World and JavaOne sustainable and reduce the conference footprint. Lets do our share to keep the conference green! Of course, don't forget the Geek Bike Ride is tomorrow.

    Read the article

  • Unity3d: Box collider attached to animated FBX models through scripts at run-time have wrong dimension

    - by Heisenbug
    I have several scripts attached to static and non static models of my scene. All models are instantiated at run-time (and must be instantiated at run-time because I'm procedural building the scene). I'd like to add a BoxCollider or SphereCollider to my FBX models at runtime. With non animated models it works simply requiring BoxCollider component from the script attached to my GameObject. BoxCollider is created of the right dimension. Something like: [RequireComponent(typeof(BoxCollider))] public class AScript: MonoBehavior { } If I do the same thing with animated models, BoxCollider are created of the wrong dimension. For example if attach the script above to penelopeFBX model of the standard asset, BoxCollider is created smaller than the mesh itself. How can I solve this?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >