Skip to content

Instantly share code, notes, and snippets.

View verymilan's full-sized avatar

Milan verymilan

View GitHub Profile
@pixelpogo
pixelpogo / gist:5229558
Created March 23, 2013 22:20
Install Z Shell (oh-my-zsh) in your Uberspace account
# download and install Oh-my-ZSH
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
# make zsh your default shell
chsh -s /bin/zsh
@subudeepak
subudeepak / WebSockets.md
Last active November 2, 2022 00:04
The problems and some security implications of websockets - Cross-site WebSockets Scripting (XSWS)

WebSockets - An Introduction

WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions

  • The server used to have a permanent listener while the client (aka browser) was not designated any fixed listener for a more long term connection. Hence, every communication was restricted to the client demanding and the server responding.
  • This meant that unless the client requested for a particular resource, the server was unable to push such a resource to the client.
  • This was detrimental since the client is then forced to check with the server at regular intervals. This meant a lot of libraries focused on optimizing asynchronous calls and identifying the response of asynchronous calls. Notably t
@khromov
khromov / bootstrap-3-grid.css
Last active June 12, 2017 16:05
Bootstrap 3 Grid (Without the rest of the framework).
/*!
* Grid portion of Bootstrap under sc- namespace.
* Classes:
* sc-container-fluid, sc-row, sc-col-X-Y (like regular B3)
*
* For more info, see:
* http://snippets.khromov.se/decoupled-bootstrap-3-grid/
*
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
@erkie
erkie / README.md
Last active October 20, 2016 08:36
Convert less to sass

Convert .less files to .scss

To run:

cd root-directory-of-project/
ruby less-to-sass.rb

# or
ruby less-to-sass.rb <file-glob-to-convert>
@mattdenner
mattdenner / README.markdown
Last active March 5, 2024 19:33
Suspend and then hibernate after 60 minutes

I found a post about suspending and then going into hibernate that included a really clever script. Turns out that with NixOS this is even esaier to coordinate as you have systemd so can have a before and after service. I just include this in my /etc/nixos/configuration.nix file and nixos-rebuild; then a systemctl suspend or a close of the lid will cause the hibernate timer to be set.

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@yuntan
yuntan / custom.css
Created August 3, 2019 01:33
writefreely dark mode compatible Custom CSS
@media (prefers-color-scheme: dark) {
body {
background-color: #181a1b;
color: rgb(202, 198, 190);
}
#blog-title a {
color: rgb(214, 211, 205);
}
.post-title a:link, .post-title a:visited {
color: rgb(214, 211, 205);