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
# install | |
sudo apt-get install proxychains | |
sudo apt-get install tor | |
# then update the files /etc/proxychains.conf and /etc/tor/torrc with the given config | |
# restart tor server | |
sudo service restart tor |
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 ffmpeg = require('ffmpeg'); | |
try { | |
var process = new ffmpeg('example.mp4'); | |
process.then(function (video) { | |
console.log('The video is ready to be processed'); | |
var watermarkPath = 'watermark-suissa.png', | |
newFilepath = './video-com-watermark.mp4', | |
settings = { | |
position : "SE" // Position: NE NC NW SE SC SW C CE CW |
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 | |
// The unzip script | |
// This script lists all of the .zip files in a directory | |
// and allows you to select one to unzip. Unlike CPanel's file | |
// manager, it _will_ overwrite existing files. | |
// | |
// To use this script, FTP or paste this script into a file in the directory | |
// with the .zip you want to unzip. Then point your web browser at this | |
// script and choose which file to unzip. |
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
function AutoResponder(e) { | |
// Our email account that will be recieving: | |
var email_account = "[email protected]"; | |
// Search for subject: | |
var subject = "testsubject"; | |
// Send our response email | |
var threads = GmailApp.search("subject:(" + subject + ") label:unread to:(" + email_account + ")"); | |
for (var i = 0; i < threads.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
<?PHP | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
* | |
* @author Jason Davis - https://www.codedevelopr.com/ | |
* | |
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/ | |
* | |
* Updated with suggested performance improvement by @PhiSYS. |
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
import React from 'react' | |
import { View } from 'native-base' | |
import { Field } from 'redux-form' | |
// Custom components | |
import { RadioButton } from '../Form' | |
export default class Gender extends React.Component { | |
state = { | |
selected: 'male' |
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
import csv | |
from django.http import HttpResponse | |
def export_as_csv_action(description="Export selected objects as CSV file", fields=None, exclude=None, header=True): | |
""" | |
This function returns an export csv action | |
'fields' and 'exclude' work like in django ModelForm | |
'header' is whether or not to output the column names as the first row | |
""" |
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
const createMySocketMiddleware = (url) => { | |
return storeAPI => { | |
let socket = createMyWebsocket(url); | |
socket.on("message", (message) => { | |
storeAPI.dispatch({ | |
type : "SOCKET_MESSAGE_RECEIVED", | |
payload : message | |
}); | |
}); |