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
const https = require('https'); | |
const querystring = require('querystring'); | |
/** | |
* Pass the data to send as `event.data`, and the request options as | |
* `event.options`. For more information see the HTTPS module documentation | |
* at https://nodejs.org/api/https.html. | |
* | |
* Will succeed with the response body. | |
*/ |
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
const crypto = require('crypto') | |
const url = require('url') | |
const fs = require('fs') | |
const http = require('http') | |
const express = require('express') | |
const {google} = require('googleapis') | |
const successView = require('./success_view') | |
const errorView = require('./error_view') | |
const googleCredentials = require('./google_client_id.json') |
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
#!bin/bash | |
while true; do | |
firefox=$(ps aux | grep -v grep | grep -ci "firefox") | |
safari=$(ps aux | grep -v grep | grep -ci "safari") | |
opera=$(ps aux | grep -v grep | grep -ci "opera") | |
brave=$(ps aux | grep -v grep | grep -ci "brave") | |
chrome=$(ps aux | grep -v grep | grep -ci "chrome") | |
if [ $firefox -gt 0 ] | |
then |
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
/** | |
* Custom breakpoints | |
* | |
*/ | |
@custom-media --desktop-XL screen and (max-width: 1920px); | |
@custom-media --desktop-L screen and (max-width: 1440px); | |
@custom-media --desktop-M screen and (max-width: 1280px); | |
@custom-media --desktop-S screen and (max-width: 1080px); | |
@custom-media --desktop-XS screen and (max-width: 900px); |
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 fs = require('fs'), | |
request = require('request'); | |
images = require('./images') // Array of images urls | |
var download = function(uri, filename, callback){ | |
request.head(uri, function(err, res, body){ | |
request(uri).pipe(fs.createWriteStream(filename)).on('close', callback); | |
}); | |
}; |
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
#!/bin/bash | |
mv location/module_name location/module_name_2 | |
git submodule deinit -f -- location/module_name | |
git rm -f location/module_name | |
rm -rf location/module_name_2 |
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
#!/bin/bash | |
for file in source/*.html.twig; do | |
git mv "$file" "`basename "$file" .html.twig`.tpl.html" | |
done |
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
#!/bin/bash | |
diskutil list | |
# Grab your disk location, i'm using /disk2 | |
diskutil unmountDisk /dev/disk2 | |
sudo dd if=/dev/zero of=/dev/rdisk2 bs=1024 | |
sudo dd if=OpenELEC-RPi2.arm-6.0.3.img of=/dev/rdisk2 bs=4m | |
sync | |
diskutil unmountDisk /dev/disk2 |
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
# Script used for automatically choose remote images files for resolving conflicts in Git | |
# You need your working copy to be in merging status | |
# Define main folders | |
LOG_FOLDER="git_log/" | |
STATUS_FILE=$LOG_FOLDER"raw_status.txt"; | |
BOTH_FILE=$LOG_FOLDER"both_modified.txt"; | |
THEIRS_FILE=$LOG_FOLDER"theirs_modified.txt"; | |
THEIRS_NEWFILE=$LOG_FOLDER"theirs_new.txt"; | |
THEIRS_DELETIONSFILE=$LOG_FOLDER"theirs_deleted.txt"; |
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
// CURL | |
var util = require('util'); | |
var exec = require('child_process').exec; | |
// API RESPONSE | |
var http = require('http'); | |
var sys = require('sys'); | |
var server = http.createServer(function(req, res) { | |
res.writeHead(200, { |
NewerOlder