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
// Working for document.body | |
var nodes = []; | |
document.body.childNodes.forEach((node) => nodes.push(node)); | |
document.body.innerHTML = ""; | |
document.body.outerHTML = document.body.outerHTML; | |
nodes.forEach((node) => document.body.appendChild(node)); |
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
var result = "" | |
// Hide the modal | |
document.getElementById("standalone-footer").setAttribute("style", "display: none !important"); | |
// Ensure the content doesn't have extra CSS | |
var content = document.getElementById("site-content"); | |
content.style.removeProperty("position"); | |
content.style.removeProperty("width"); | |
content.style.removeProperty("margin-top"); | |
// Recreate the body to remove any touchmove events on body |
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
var answers = []; | |
if (window.localStorage.getItem("gameState") === null) { | |
answers = getWordleState().states[0].data.boardState; | |
} | |
else { | |
answers = JSON.parse(window.localStorage.getItem("gameState")).boardState; | |
} | |
function getWordleState() { | |
for (var i = 0; i < window.localStorage.length; i++) { |
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
var answers = ['stare', 'moldy', 'bidon', 'dingo', '', '']; | |
for (var i = answers.length - 1; i >= 0; i--) { | |
if (answers[i] != '') { | |
changeInput('#answer', answers[i]); | |
break; | |
} | |
} | |
for (var i = 0; i < answers.length; i++) { | |
if (answers[i] != '') { |
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 | |
# Usage: ./set-access-points.sh [network SSID] [network interface id = wlan0] | |
# Read in the arguements | |
ssid=$1; | |
interface=$2; | |
# SSID is required | |
if [ -z "$ssid" ]; then |
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
<?php | |
class Php_ExcelWriter implements ExcelWriterInterface | |
{ | |
protected $spreadsheet; | |
protected $writer; | |
protected $templateSheet = -1; | |
public function __construct() | |
{ |
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/sh | |
# Ensure we've got libxml2 | |
apt-get update | |
apt-get install libxml2-dev | |
# Make /src directory, if required | |
mkdir /src | |
cd /src |
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
<?php | |
use Illuminate\Foundation\Testing\WithoutMiddleware; | |
use Illuminate\Foundation\Testing\DatabaseMigrations; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
class ExamplePassportTest extends \PassportTestCase | |
{ | |
use DatabaseTransactions; |
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.directive('ionSticky', ['$ionicPosition', '$compile', '$timeout', function ($ionicPosition, $compile, $timeout) { | |
return { | |
restrict: 'A', | |
require: '^$ionicScroll', | |
link: function ($scope, $element, $attr, $ionicScroll) { | |
var scroll = angular.element($ionicScroll.element); | |
var clone; | |
// creates the sticky clone and adds it to DOM | |
var createStickyClone = function ($element) { | |
clone = $element.clone().css({ |
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 | |
# Input the project details | |
echo "Enter the project name:" | |
read name | |
echo "Enter a description for the project:" | |
read description |