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 fsDoOverwrite = true // Overwrite file with base64 code | |
var fsAsASCII = false // Create base64 code file as ASCII file | |
var adTypeBinary = 1 // Binary file is encoded | |
function encode(from, to) { | |
var inputStream = WScript.CreateObject("ADODB.Stream"); | |
inputStream.Type = adTypeBinary | |
inputStream.Open(); | |
inputStream.LoadFromFile(from); | |
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
cd /root | |
rm -rf /root/src | |
mkdir -p /root/src | |
cd /root/src | |
rm -rf /root/src/node-* | |
rm /usr/local/bin/node | |
rm /usr/local/bin/npm |
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
http://www.jamesnorthway.com/simple_file_printer_sharing_windows_2003.html | |
Enable the guest account with a blank password on Windows 2003 | |
1. Click Start->Run and enter gpedit.msc | |
2. Locate Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Accounts: Guest account status and set it to Enabled | |
3. Now we give the guest account access to all the rights assigned to “Everyone” for file and folder permissions. Be warned, once we’re done here file and printer sharing on this server will have about the same level of security as file and printer shares on Windows 98 (none) – so don’t do this on anything accessible from outside a home or small office network. |
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
git config user.email "[email protected]" | |
git config user.name "Your Name" | |
git config remote.origin.push HEAD |
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 forEach(obj, callback) { | |
for (prop in obj) { | |
if (obj.hasOwnProperty(prop)) { | |
callback(prop, obj[prop]); | |
}; | |
}; | |
}; |
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 page = new WebPage(), testindex = 0, loadInProgress = false; | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; | |
page.onLoadStarted = function() { | |
loadInProgress = true; | |
console.log("load started"); | |
}; |
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
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16"/> | |
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" | |
android:allowBackup="false" | |
android:hardwareAccelerated="true"> | |
<activity android:name="class1" android:label="@string/app_name" | |
android:theme="@style/MyOwnTheme" | |
android:uiOptions="splitActionBarWhenNarrow" | |
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"> | |
<intent-filter> |
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 exec = require('child_process').exec; | |
var ping = exec('ping 127.0.0.1'); | |
/*var ping = exec('cmd /C ping 127.0.0.1');*/ | |
ping.stdout.on('data', function (data) { | |
console.log('' + 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
sudo amdcccle | |
gksudo amdcccle |
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
<div id="google_translate_element"></div> | |
<script type="text/javascript"> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); | |
} | |
</script> | |
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |