Skip to content

Instantly share code, notes, and snippets.

########################
# Block windows update
########################
127.0.0.1 *.update.microsoft.com
127.0.0.1 *.windowsupdate.com
127.0.0.1 *.windows.com
@awsp
awsp / cp.json
Last active August 26, 2020 18:20
cp.json
"redeemPoints": {
"addEmailMessage": "To redeem for a digital gift card, please add an email address to your account and allow 24 hours for security; then come back and redeem.",
"amountRequired": "Amount Required",
"budgetExceeded": "You do not have enough points to make this purchase.",
"buyMorePoints": "Buy More Points",
"categories": "Categories",
"confirmMemberInfo": "Confirm Your Member Info:",
"confirmationTitle": "Redemption Confirmation",
"digitalGiftCardAvailable": "Digital gift card available!",
"digitalGiftCardLimitNotification": "You can only make 1 gift card transaction (digital or plastic) every 48 hours.",
@awsp
awsp / CalendarView.java
Created June 22, 2018 18:15 — forked from james-d/CalendarView.java
Simple demo of creating a appointment-calendar like view (similar to the default calendar view in Google Calendar), in JavaFX 8. Just manages selection of time slots in the grid.
package calendarview;
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
@awsp
awsp / qutebrowser_issue.txt
Last active April 25, 2018 22:25
QuteBrowser running on Manjaro Linux / VMWare
$ qutebrowser
[0425/100426.571255:WARNING:stack_trace_posix.cc(648)] Failed to open file: /home/awsp/#2114711 (deleted)
Error: No such file or directory
10:04:26 INFO: Run :adblock-update to get adblock lists.
python3: /usr/include/libsync.h:125: sync_accumulate: Assertion `fd2 >= 0' failed.
Received signal 6
#0 0x7fb618b56e76 <unknown>
#1 0x7fb6177d488c <unknown>
#2 0x7fb618b571ec <unknown>
#3 0x7fb62eacbdd0 <unknown>
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
@awsp
awsp / capitialize.js
Created June 8, 2017 20:27
Cap first letter of each word
'THIS IS A TEST'.toLowerCase().split(' ').map(function (value, key) { return value.charAt(0).toUpperCase() + value.slice(1); }).join(' ');
// print 'This Is A Test'
@awsp
awsp / mp3.js
Created May 12, 2017 10:27 — forked from dtrce/mp3.js
streaming mp3 using nodejs
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {
@awsp
awsp / gist:fe30fd699a13cf62538ac122b3a8222c
Created February 16, 2017 01:58
Virtualbox on Ubuntu Server
sudo apt update
sudo apt install virtualbox-guest-dkms
sudo adduser [your-user] vboxsf
[re-login]
@awsp
awsp / responsive.css
Created January 3, 2017 10:15 — forked from helielson/responsive.css
Boilerplate CSS Media Queries
* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
@awsp
awsp / backup.bat
Created September 16, 2016 02:19
Auto backup in Windows and rename based on timestamp
robocopy "c:\test" "c:\target\tmp" /s
cd c:\target
ren "tmp" "backup - %date:/=-% %time::=-%"