This file contains 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
plink.exe -ssh <tunnel params using -R, -L and -D> user@host "echo; echo; export PS1=;secs=$((3600)); while [ $secs -gt 0 ]; do echo -ne \"This tunnel will auto-shutdown in: $secs \\r\"; sleep 1; : $((secs--)); done; echo -ne \"Tunnel closed! \"; echo; echo;" |
This file contains 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
É mãozada forte, mantenha backup de todos os arquivos envolvidos! Sério, chorei e quebrei meu Eclipse várias vezes | |
até aprender a fazer isso que nem gente. Agora virou rotina. | |
Basicamente eu coloco os arquivos mais acessados pelo programa em uma uma unidade virtual montada na memória RAM | |
(ao invés de usar parte do HD), que chega a uma transferência de mais de 2GB/s. O nome disso é "ramdisk" pra quem | |
quiser buscar no Google. Aqui tem um PDF explicando como fazer, com um benchmark comparando a performance: | |
http://paulera.insomnia247.nl/docs/ramdisk.pdf - Obviamente, estamos abrindo mão de um teco da memória, então é bom | |
ter de sobra. | |
TL;DR: Eu uso um script para isso, basta rodar um prompt como admin, e executar a BAT passando |
This file contains 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 devRant dark theme listing mode | |
// @namespace cosmicspace | |
// @version 0.1 | |
// @description Make devRant listing black. Because white bg sucks. | |
// @author https://www.devrant.io/users/paulera | |
// @match www.devrant.io/* | |
// @grant GM_addStyle | |
// ==/UserScript== |
This file contains 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
/** | |
* Decrease font-size to limit div's height. | |
* Requires jQuery and must be called with setTimeout (as below) | |
* to wait for elements to be rendered before sdjust them. | |
* | |
* Example: | |
* <div data-auto-max-height="50">The font-size of this text will decrease until the div has 50px in height</div> | |
*/ | |
$(document).ready(function() { |
This file contains 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
PFont defaultFont; | |
int paddingLeft = 25; | |
int paddingTop = 20; | |
int row = 0; | |
int fontSize = 24; | |
int lineHeight = fontSize * 4; | |
int examplesPerColumn = 9; | |
int exampleCount = 0; | |
int columnWidth = 900; |
This file contains 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
// Required library to communicate with Serial port | |
import processing.serial.*; | |
// variables to store rectangle X position, Y position, Width and Height | |
int x, y; | |
// The object that wil communicate with the Serial port | |
AccelerometerReader reader; | |
void setup() { |
This file contains 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
drawGrid = true; | |
void drawOnce() { | |
fill(0); | |
PFont myFont = createFont("Impact", 35); | |
textFont(myFont); | |
textAlign(CENTER); | |
text("TRUCK DELIVERED BOMB", 10, 30, 380, 50); | |
This file contains 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
import javax.script.*; | |
void setup() { | |
// creates and object to be manipulated by | |
// the script | |
MyClass obj = new MyClass(); | |
// object state BEFORE running the script | |
println("Before:"); |
This file contains 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
#!/bin/bash | |
# Command to monitor the available dates for booking a working permit renewal in GNIB office: | |
watch -n 60 "curl -s 'https://burghquayregistrationoffice.inis.gov.ie/Website/AMSREG/AMSRegWeb.nsf/(getAppsNear)?openpage&cat=Work&sbcat=All&typ=Renewal' | sed 's/\"/+/g' | tr '{' '\n' | grep time | awk -F+ '{ print \$4; }'" | |
# TO USE IT WITHOUT WATCH, REMOVE THE BACKSLASH OF \$4 IN AWK COMMAND: | |
# curl -s 'https://burghquayregistrationoffice.inis.gov.ie/Website/AMSREG/AMSRegWeb.nsf/(getAppsNear)?openpage&cat=Work&sbcat=All&typ=Renewal' | sed 's/\"/+/g' | tr '{' '\n' | grep time | awk -F+ '{ print $4; }' | |
# Sample output: |
This file contains 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
void setup() { | |
// --------------------------------------- | |
// screen mode (pick one) | |
// --------------------------------------- | |
size (220,130); | |
surface.setResizable(true); | |
// -- OR --------------------------------- | |
// fullScreen(); | |
// --------------------------------------- |
OlderNewer